Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bc81fef

Browse filesBrowse files
nornagonaddaleax
authored andcommitted
vm: mark scripts as shareable cross-origin
PR-URL: #25380 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 29002ce commit bc81fef
Copy full SHA for bc81fef

File tree

Expand file treeCollapse file tree

3 files changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎src/module_wrap.cc‎

Copy file name to clipboardExpand all lines: src/module_wrap.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void ModuleWrap::New(const FunctionCallbackInfo<Value>& args) {
148148
ScriptOrigin origin(url,
149149
line_offset, // line offset
150150
column_offset, // column offset
151-
False(isolate), // is cross origin
151+
True(isolate), // is cross origin
152152
Local<Integer>(), // script id
153153
Local<Value>(), // source map URL
154154
False(isolate), // is opaque (?)
Collapse file

‎src/node_contextify.cc‎

Copy file name to clipboardExpand all lines: src/node_contextify.cc
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
692692
ScriptOrigin origin(filename,
693693
line_offset, // line offset
694694
column_offset, // column offset
695-
False(isolate), // is cross origin
695+
True(isolate), // is cross origin
696696
Local<Integer>(), // script id
697697
Local<Value>(), // source map URL
698698
False(isolate), // is opaque (?)
@@ -1004,7 +1004,7 @@ void ContextifyContext::CompileFunction(
10041004
data + cached_data_buf->ByteOffset(), cached_data_buf->ByteLength());
10051005
}
10061006

1007-
ScriptOrigin origin(filename, line_offset, column_offset);
1007+
ScriptOrigin origin(filename, line_offset, column_offset, True(isolate));
10081008
ScriptCompiler::Source source(code, origin, cached_data);
10091009
ScriptCompiler::CompileOptions options;
10101010
if (source.GetCachedData() == nullptr) {
Collapse file

‎src/node_native_module.cc‎

Copy file name to clipboardExpand all lines: src/node_native_module.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ MaybeLocal<Function> NativeModuleLoader::LookupAndCompile(
218218
OneByteString(isolate, filename_s.c_str(), filename_s.size());
219219
Local<Integer> line_offset = Integer::New(isolate, 0);
220220
Local<Integer> column_offset = Integer::New(isolate, 0);
221-
ScriptOrigin origin(filename, line_offset, column_offset);
221+
ScriptOrigin origin(filename, line_offset, column_offset, True(isolate));
222222

223223
Mutex::ScopedLock lock(code_cache_mutex_);
224224

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.