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

Side by Side Diff: src/d8.cc

Issue 917703003: [strong] no sloppy equality (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months 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
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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 826
827 827
828 void Shell::AddHistogramSample(void* histogram, int sample) { 828 void Shell::AddHistogramSample(void* histogram, int sample) {
829 Counter* counter = reinterpret_cast<Counter*>(histogram); 829 Counter* counter = reinterpret_cast<Counter*>(histogram);
830 counter->AddSample(sample); 830 counter->AddSample(sample);
831 } 831 }
832 832
833 833
834 void Shell::InstallUtilityScript(Isolate* isolate) { 834 void Shell::InstallUtilityScript(Isolate* isolate) {
835 HandleScope scope(isolate); 835 HandleScope scope(isolate);
836 // TODO(rossberg): Utility scripts do not yet obey strong mode rules.
837 bool use_strong = i::FLAG_use_strong;
838 i::FLAG_use_strong = false;
839
836 // If we use the utility context, we have to set the security tokens so that 840 // If we use the utility context, we have to set the security tokens so that
837 // utility, evaluation and debug context can all access each other. 841 // utility, evaluation and debug context can all access each other.
838 v8::Local<v8::Context> utility_context = 842 v8::Local<v8::Context> utility_context =
839 v8::Local<v8::Context>::New(isolate, utility_context_); 843 v8::Local<v8::Context>::New(isolate, utility_context_);
840 v8::Local<v8::Context> evaluation_context = 844 v8::Local<v8::Context> evaluation_context =
841 v8::Local<v8::Context>::New(isolate, evaluation_context_); 845 v8::Local<v8::Context>::New(isolate, evaluation_context_);
842 utility_context->SetSecurityToken(Undefined(isolate)); 846 utility_context->SetSecurityToken(Undefined(isolate));
843 evaluation_context->SetSecurityToken(Undefined(isolate)); 847 evaluation_context->SetSecurityToken(Undefined(isolate));
844 v8::Context::Scope context_scope(utility_context); 848 v8::Context::Scope context_scope(utility_context);
845 849
(...skipping 29 matching lines...) Expand all
875 i::Handle<i::Object> compiled_script = Utils::OpenHandle(*script); 879 i::Handle<i::Object> compiled_script = Utils::OpenHandle(*script);
876 i::Handle<i::Script> script_object = compiled_script->IsJSFunction() 880 i::Handle<i::Script> script_object = compiled_script->IsJSFunction()
877 ? i::Handle<i::Script>(i::Script::cast( 881 ? i::Handle<i::Script>(i::Script::cast(
878 i::JSFunction::cast(*compiled_script)->shared()->script())) 882 i::JSFunction::cast(*compiled_script)->shared()->script()))
879 : i::Handle<i::Script>(i::Script::cast( 883 : i::Handle<i::Script>(i::Script::cast(
880 i::SharedFunctionInfo::cast(*compiled_script)->script())); 884 i::SharedFunctionInfo::cast(*compiled_script)->script()));
881 script_object->set_type(i::Smi::FromInt(i::Script::TYPE_NATIVE)); 885 script_object->set_type(i::Smi::FromInt(i::Script::TYPE_NATIVE));
882 886
883 // Start the in-process debugger if requested. 887 // Start the in-process debugger if requested.
884 if (i::FLAG_debugger) v8::Debug::SetDebugEventListener(HandleDebugEvent); 888 if (i::FLAG_debugger) v8::Debug::SetDebugEventListener(HandleDebugEvent);
889
890 i::FLAG_use_strong = use_strong;
885 } 891 }
886 #endif // !V8_SHARED 892 #endif // !V8_SHARED
887 893
888 894
889 Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) { 895 Handle<ObjectTemplate> Shell::CreateGlobalTemplate(Isolate* isolate) {
890 Handle<ObjectTemplate> global_template = ObjectTemplate::New(isolate); 896 Handle<ObjectTemplate> global_template = ObjectTemplate::New(isolate);
891 global_template->Set(String::NewFromUtf8(isolate, "print"), 897 global_template->Set(String::NewFromUtf8(isolate, "print"),
892 FunctionTemplate::New(isolate, Print)); 898 FunctionTemplate::New(isolate, Print));
893 global_template->Set(String::NewFromUtf8(isolate, "write"), 899 global_template->Set(String::NewFromUtf8(isolate, "write"),
894 FunctionTemplate::New(isolate, Write)); 900 FunctionTemplate::New(isolate, Write));
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
1690 } 1696 }
1691 1697
1692 } // namespace v8 1698 } // namespace v8
1693 1699
1694 1700
1695 #ifndef GOOGLE3 1701 #ifndef GOOGLE3
1696 int main(int argc, char* argv[]) { 1702 int main(int argc, char* argv[]) {
1697 return v8::Shell::Main(argc, argv); 1703 return v8::Shell::Main(argc, argv);
1698 } 1704 }
1699 #endif 1705 #endif
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | src/messages.js » ('j') | src/messages.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698