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

Side by Side Diff: gin/modules/module_runner_delegate.cc

Issue 1118643002: Replace v8::Handle with v8::Local in gin/modules/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « gin/modules/module_runner_delegate.h ('k') | gin/modules/timer.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium 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 "gin/modules/module_runner_delegate.h" 5 #include "gin/modules/module_runner_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "gin/modules/module_registry.h" 9 #include "gin/modules/module_registry.h"
10 #include "gin/object_template_builder.h" 10 #include "gin/object_template_builder.h"
(...skipping 20 matching lines...) Expand all
31 } 31 }
32 32
33 void ModuleRunnerDelegate::AttemptToLoadMoreModules(Runner* runner) { 33 void ModuleRunnerDelegate::AttemptToLoadMoreModules(Runner* runner) {
34 ModuleRegistry* registry = ModuleRegistry::From( 34 ModuleRegistry* registry = ModuleRegistry::From(
35 runner->GetContextHolder()->context()); 35 runner->GetContextHolder()->context());
36 registry->AttemptToLoadMoreModules(runner->GetContextHolder()->isolate()); 36 registry->AttemptToLoadMoreModules(runner->GetContextHolder()->isolate());
37 module_provider_.AttempToLoadModules( 37 module_provider_.AttempToLoadModules(
38 runner, registry->unsatisfied_dependencies()); 38 runner, registry->unsatisfied_dependencies());
39 } 39 }
40 40
41 v8::Handle<v8::ObjectTemplate> ModuleRunnerDelegate::GetGlobalTemplate( 41 v8::Local<v8::ObjectTemplate> ModuleRunnerDelegate::GetGlobalTemplate(
42 ShellRunner* runner, 42 ShellRunner* runner,
43 v8::Isolate* isolate) { 43 v8::Isolate* isolate) {
44 v8::Handle<v8::ObjectTemplate> templ = ObjectTemplateBuilder(isolate).Build(); 44 v8::Local<v8::ObjectTemplate> templ = ObjectTemplateBuilder(isolate).Build();
45 ModuleRegistry::RegisterGlobals(isolate, templ); 45 ModuleRegistry::RegisterGlobals(isolate, templ);
46 return templ; 46 return templ;
47 } 47 }
48 48
49 void ModuleRunnerDelegate::DidCreateContext(ShellRunner* runner) { 49 void ModuleRunnerDelegate::DidCreateContext(ShellRunner* runner) {
50 ShellRunnerDelegate::DidCreateContext(runner); 50 ShellRunnerDelegate::DidCreateContext(runner);
51 51
52 v8::Handle<v8::Context> context = runner->GetContextHolder()->context(); 52 v8::Local<v8::Context> context = runner->GetContextHolder()->context();
53 ModuleRegistry* registry = ModuleRegistry::From(context); 53 ModuleRegistry* registry = ModuleRegistry::From(context);
54 54
55 v8::Isolate* isolate = runner->GetContextHolder()->isolate(); 55 v8::Isolate* isolate = runner->GetContextHolder()->isolate();
56 56
57 for (BuiltinModuleMap::const_iterator it = builtin_modules_.begin(); 57 for (BuiltinModuleMap::const_iterator it = builtin_modules_.begin();
58 it != builtin_modules_.end(); ++it) { 58 it != builtin_modules_.end(); ++it) {
59 registry->AddBuiltinModule(isolate, it->first, it->second.Run(isolate)); 59 registry->AddBuiltinModule(isolate, it->first, it->second.Run(isolate));
60 } 60 }
61 } 61 }
62 62
63 void ModuleRunnerDelegate::DidRunScript(ShellRunner* runner) { 63 void ModuleRunnerDelegate::DidRunScript(ShellRunner* runner) {
64 AttemptToLoadMoreModules(runner); 64 AttemptToLoadMoreModules(runner);
65 } 65 }
66 66
67 } // namespace gin 67 } // namespace gin
OLDNEW
« no previous file with comments | « gin/modules/module_runner_delegate.h ('k') | gin/modules/timer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698