Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/d8.cc

Issue 1490783002: [bootstrapper] add checks for variable bindings in native scripts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | src/js/date.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 Script::Compile(utility_context, source, &origin).ToLocalChecked(); 1079 Script::Compile(utility_context, source, &origin).ToLocalChecked();
1080 script->Run(utility_context).ToLocalChecked(); 1080 script->Run(utility_context).ToLocalChecked();
1081 // Mark the d8 shell script as native to avoid it showing up as normal source 1081 // Mark the d8 shell script as native to avoid it showing up as normal source
1082 // in the debugger. 1082 // in the debugger.
1083 i::Handle<i::Object> compiled_script = Utils::OpenHandle(*script); 1083 i::Handle<i::Object> compiled_script = Utils::OpenHandle(*script);
1084 i::Handle<i::Script> script_object = compiled_script->IsJSFunction() 1084 i::Handle<i::Script> script_object = compiled_script->IsJSFunction()
1085 ? i::Handle<i::Script>(i::Script::cast( 1085 ? i::Handle<i::Script>(i::Script::cast(
1086 i::JSFunction::cast(*compiled_script)->shared()->script())) 1086 i::JSFunction::cast(*compiled_script)->shared()->script()))
1087 : i::Handle<i::Script>(i::Script::cast( 1087 : i::Handle<i::Script>(i::Script::cast(
1088 i::SharedFunctionInfo::cast(*compiled_script)->script())); 1088 i::SharedFunctionInfo::cast(*compiled_script)->script()));
1089 script_object->set_type(i::Script::TYPE_NATIVE); 1089 script_object->set_type(i::Script::TYPE_EXTENSION);
1090 } 1090 }
1091 #endif // !V8_SHARED 1091 #endif // !V8_SHARED
1092 1092
1093 1093
1094 Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) { 1094 Local<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
1095 Local<ObjectTemplate> global_template = ObjectTemplate::New(isolate); 1095 Local<ObjectTemplate> global_template = ObjectTemplate::New(isolate);
1096 global_template->Set( 1096 global_template->Set(
1097 String::NewFromUtf8(isolate, "print", NewStringType::kNormal) 1097 String::NewFromUtf8(isolate, "print", NewStringType::kNormal)
1098 .ToLocalChecked(), 1098 .ToLocalChecked(),
1099 FunctionTemplate::New(isolate, Print)); 1099 FunctionTemplate::New(isolate, Print));
(...skipping 1429 matching lines...) Expand 10 before | Expand all | Expand 10 after
2529 } 2529 }
2530 2530
2531 } // namespace v8 2531 } // namespace v8
2532 2532
2533 2533
2534 #ifndef GOOGLE3 2534 #ifndef GOOGLE3
2535 int main(int argc, char* argv[]) { 2535 int main(int argc, char* argv[]) {
2536 return v8::Shell::Main(argc, argv); 2536 return v8::Shell::Main(argc, argv);
2537 } 2537 }
2538 #endif 2538 #endif
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/js/date.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698