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

Side by Side Diff: src/d8.cc

Issue 1773653002: [strong] Remove all remainders of strong mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Oversight Created 4 years, 9 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
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/flag-definitions.h » ('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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after
1051 return GetCounter(name, true); 1051 return GetCounter(name, true);
1052 } 1052 }
1053 1053
1054 1054
1055 void Shell::AddHistogramSample(void* histogram, int sample) { 1055 void Shell::AddHistogramSample(void* histogram, int sample) {
1056 Counter* counter = reinterpret_cast<Counter*>(histogram); 1056 Counter* counter = reinterpret_cast<Counter*>(histogram);
1057 counter->AddSample(sample); 1057 counter->AddSample(sample);
1058 } 1058 }
1059 1059
1060 1060
1061 class NoUseStrongForUtilityScriptScope {
1062 public:
1063 NoUseStrongForUtilityScriptScope() : flag_(i::FLAG_use_strong) {
1064 i::FLAG_use_strong = false;
1065 }
1066 ~NoUseStrongForUtilityScriptScope() { i::FLAG_use_strong = flag_; }
1067
1068 private:
1069 bool flag_;
1070 };
1071
1072
1073 void Shell::InstallUtilityScript(Isolate* isolate) { 1061 void Shell::InstallUtilityScript(Isolate* isolate) {
1074 NoUseStrongForUtilityScriptScope no_use_strong;
1075 HandleScope scope(isolate); 1062 HandleScope scope(isolate);
1076 // If we use the utility context, we have to set the security tokens so that 1063 // If we use the utility context, we have to set the security tokens so that
1077 // utility, evaluation and debug context can all access each other. 1064 // utility, evaluation and debug context can all access each other.
1078 Local<ObjectTemplate> global_template = CreateGlobalTemplate(isolate); 1065 Local<ObjectTemplate> global_template = CreateGlobalTemplate(isolate);
1079 utility_context_.Reset(isolate, Context::New(isolate, NULL, global_template)); 1066 utility_context_.Reset(isolate, Context::New(isolate, NULL, global_template));
1080 v8::Local<v8::Context> utility_context = 1067 v8::Local<v8::Context> utility_context =
1081 v8::Local<v8::Context>::New(isolate, utility_context_); 1068 v8::Local<v8::Context>::New(isolate, utility_context_);
1082 v8::Local<v8::Context> evaluation_context = 1069 v8::Local<v8::Context> evaluation_context =
1083 v8::Local<v8::Context>::New(isolate, evaluation_context_); 1070 v8::Local<v8::Context>::New(isolate, evaluation_context_);
1084 utility_context->SetSecurityToken(Undefined(isolate)); 1071 utility_context->SetSecurityToken(Undefined(isolate));
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 } 2540 }
2554 2541
2555 } // namespace v8 2542 } // namespace v8
2556 2543
2557 2544
2558 #ifndef GOOGLE3 2545 #ifndef GOOGLE3
2559 int main(int argc, char* argv[]) { 2546 int main(int argc, char* argv[]) {
2560 return v8::Shell::Main(argc, argv); 2547 return v8::Shell::Main(argc, argv);
2561 } 2548 }
2562 #endif 2549 #endif
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.cc ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698