Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark scripts as shareable cross-origin #25380

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/module_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
ScriptOrigin origin(url,
line_offset, // line offset
column_offset, // column offset
False(isolate), // is cross origin
True(isolate), // is cross origin
Local<Integer>(), // script id
Local<Value>(), // source map URL
False(isolate), // is opaque (?)
Expand Down
4 changes: 2 additions & 2 deletions src/node_contextify.cc
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
ScriptOrigin origin(filename,
line_offset, // line offset
column_offset, // column offset
False(isolate), // is cross origin
True(isolate), // is cross origin
Local<Integer>(), // script id
Local<Value>(), // source map URL
False(isolate), // is opaque (?)
Expand Down Expand Up @@ -1004,7 +1004,7 @@ void ContextifyContext::CompileFunction(
data + cached_data_buf->ByteOffset(), cached_data_buf->ByteLength());
}

ScriptOrigin origin(filename, line_offset, column_offset);
ScriptOrigin origin(filename, line_offset, column_offset, True(isolate));
ScriptCompiler::Source source(code, origin, cached_data);
ScriptCompiler::CompileOptions options;
if (source.GetCachedData() == nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion src/node_native_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ MaybeLocal<Function> NativeModuleLoader::LookupAndCompile(
OneByteString(isolate, filename_s.c_str(), filename_s.size());
Local<Integer> line_offset = Integer::New(isolate, 0);
Local<Integer> column_offset = Integer::New(isolate, 0);
ScriptOrigin origin(filename, line_offset, column_offset);
ScriptOrigin origin(filename, line_offset, column_offset, True(isolate));

Mutex::ScopedLock lock(code_cache_mutex_);

Expand Down