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

Side by Side Diff: src/bootstrapper.cc

Issue 469783002: Require V8 to be explicitly initialized before an Isolate is created (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/base/utils/random-number-generator.cc ('k') | src/d8.cc » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/bootstrapper.h" 5 #include "src/bootstrapper.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/extensions/externalize-string-extension.h" 9 #include "src/extensions/externalize-string-extension.h"
10 #include "src/extensions/free-buffer-extension.h" 10 #include "src/extensions/free-buffer-extension.h"
(...skipping 2576 matching lines...) Expand 10 before | Expand all | Expand 10 after
2587 2587
2588 2588
2589 Genesis::Genesis(Isolate* isolate, 2589 Genesis::Genesis(Isolate* isolate,
2590 MaybeHandle<JSGlobalProxy> maybe_global_proxy, 2590 MaybeHandle<JSGlobalProxy> maybe_global_proxy,
2591 v8::Handle<v8::ObjectTemplate> global_proxy_template, 2591 v8::Handle<v8::ObjectTemplate> global_proxy_template,
2592 v8::ExtensionConfiguration* extensions) 2592 v8::ExtensionConfiguration* extensions)
2593 : isolate_(isolate), 2593 : isolate_(isolate),
2594 active_(isolate->bootstrapper()) { 2594 active_(isolate->bootstrapper()) {
2595 NoTrackDoubleFieldsForSerializerScope disable_scope(isolate); 2595 NoTrackDoubleFieldsForSerializerScope disable_scope(isolate);
2596 result_ = Handle<Context>::null(); 2596 result_ = Handle<Context>::null();
2597 // If V8 cannot be initialized, just return.
2598 if (!V8::Initialize(NULL)) return;
2599
2600 // Before creating the roots we must save the context and restore it 2597 // Before creating the roots we must save the context and restore it
2601 // on all function exits. 2598 // on all function exits.
2602 SaveContext saved_context(isolate); 2599 SaveContext saved_context(isolate);
2603 2600
2604 // During genesis, the boilerplate for stack overflow won't work until the 2601 // During genesis, the boilerplate for stack overflow won't work until the
2605 // environment has been at least partially initialized. Add a stack check 2602 // environment has been at least partially initialized. Add a stack check
2606 // before entering JS code to catch overflow early. 2603 // before entering JS code to catch overflow early.
2607 StackLimitCheck check(isolate); 2604 StackLimitCheck check(isolate);
2608 if (check.HasOverflowed()) return; 2605 if (check.HasOverflowed()) return;
2609 2606
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
2716 return from + sizeof(NestingCounterType); 2713 return from + sizeof(NestingCounterType);
2717 } 2714 }
2718 2715
2719 2716
2720 // Called when the top-level V8 mutex is destroyed. 2717 // Called when the top-level V8 mutex is destroyed.
2721 void Bootstrapper::FreeThreadResources() { 2718 void Bootstrapper::FreeThreadResources() {
2722 DCHECK(!IsActive()); 2719 DCHECK(!IsActive());
2723 } 2720 }
2724 2721
2725 } } // namespace v8::internal 2722 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/base/utils/random-number-generator.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698