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

Side by Side Diff: mojo/public/bindings/js/support.cc

Issue 94483002: Remove usage of deprecated V8 APIs from mojo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | « mojo/public/bindings/js/core.cc ('k') | mojo/public/bindings/js/waiting_callback.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 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 "mojo/public/bindings/js/support.h" 5 #include "mojo/public/bindings/js/support.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "gin/arguments.h" 8 #include "gin/arguments.h"
9 #include "gin/converter.h" 9 #include "gin/converter.h"
10 #include "gin/function_template.h" 10 #include "gin/function_template.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 const char Support::kModuleName[] = "mojo/public/bindings/js/support"; 57 const char Support::kModuleName[] = "mojo/public/bindings/js/support";
58 58
59 v8::Local<v8::ObjectTemplate> Support::GetTemplate(v8::Isolate* isolate) { 59 v8::Local<v8::ObjectTemplate> Support::GetTemplate(v8::Isolate* isolate) {
60 gin::PerIsolateData* data = gin::PerIsolateData::From(isolate); 60 gin::PerIsolateData* data = gin::PerIsolateData::From(isolate);
61 v8::Local<v8::ObjectTemplate> templ = data->GetObjectTemplate( 61 v8::Local<v8::ObjectTemplate> templ = data->GetObjectTemplate(
62 &g_wrapper_info); 62 &g_wrapper_info);
63 63
64 if (templ.IsEmpty()) { 64 if (templ.IsEmpty()) {
65 WaitingCallback::EnsureRegistered(isolate); 65 WaitingCallback::EnsureRegistered(isolate);
66 66
67 templ = v8::ObjectTemplate::New(); 67 templ = v8::ObjectTemplate::New(isolate);
68 68
69 templ->Set(gin::StringToSymbol(isolate, "asyncWait"), 69 templ->Set(gin::StringToSymbol(isolate, "asyncWait"),
70 v8::FunctionTemplate::New(AsyncWait)); 70 v8::FunctionTemplate::New(isolate, AsyncWait));
71 templ->Set(gin::StringToSymbol(isolate, "cancelWait"), 71 templ->Set(gin::StringToSymbol(isolate, "cancelWait"),
72 gin::CreateFunctionTemplate(isolate, base::Bind(CancelWait))); 72 gin::CreateFunctionTemplate(isolate, base::Bind(CancelWait)));
73 73
74 data->SetObjectTemplate(&g_wrapper_info, templ); 74 data->SetObjectTemplate(&g_wrapper_info, templ);
75 } 75 }
76 76
77 return templ; 77 return templ;
78 } 78 }
79 79
80 } // namespace js 80 } // namespace js
81 } // namespace mojo 81 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/bindings/js/core.cc ('k') | mojo/public/bindings/js/waiting_callback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698