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

Unified Diff: gin/runner.cc

Issue 76353002: Introduce a Gin class instead of using global functions to control gin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gin/runner.h ('k') | gin/runner_unittest.cc » ('j') | gin/test/file_runner.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/runner.cc
diff --git a/gin/runner.cc b/gin/runner.cc
index 46671c592a1e7caf4c98b285c14e97dc112ab8b4..f45d6a03191498323c898bf8519370cf55550117 100644
--- a/gin/runner.cc
+++ b/gin/runner.cc
@@ -42,6 +42,7 @@ Runner::Runner(RunnerDelegate* delegate, Isolate* isolate)
: ContextHolder(isolate),
delegate_(delegate),
weak_factory_(this) {
+ v8::Isolate::Scope isolate_scope(isolate);
HandleScope handle_scope(isolate);
SetContext(Context::New(isolate, NULL, delegate_->GetGlobalTemplate(this)));
@@ -66,7 +67,8 @@ void Runner::Run(v8::Handle<Script> script) {
}
Runner::Scope::Scope(Runner* runner)
- : handle_scope_(runner->isolate()),
+ : isolate_scope_(runner->isolate()),
+ handle_scope_(runner->isolate()),
scope_(runner->context()) {
}
« no previous file with comments | « gin/runner.h ('k') | gin/runner_unittest.cc » ('j') | gin/test/file_runner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698