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

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

Issue 2126763002: Remove the prototype from all V8 functions that aren't constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 5 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/function_template.h ('k') | mojo/public/js/validation_unittests.js » ('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_registry.h" 5 #include "gin/modules/module_registry.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 WrapperInfo g_wrapper_info = { kEmbedderNativeGin }; 89 WrapperInfo g_wrapper_info = { kEmbedderNativeGin };
90 90
91 Local<FunctionTemplate> GetDefineTemplate(Isolate* isolate) { 91 Local<FunctionTemplate> GetDefineTemplate(Isolate* isolate) {
92 PerIsolateData* data = PerIsolateData::From(isolate); 92 PerIsolateData* data = PerIsolateData::From(isolate);
93 Local<FunctionTemplate> templ = data->GetFunctionTemplate( 93 Local<FunctionTemplate> templ = data->GetFunctionTemplate(
94 &g_wrapper_info); 94 &g_wrapper_info);
95 if (templ.IsEmpty()) { 95 if (templ.IsEmpty()) {
96 templ = FunctionTemplate::New(isolate, Define); 96 templ = FunctionTemplate::New(isolate, Define);
97 templ->RemovePrototype();
97 data->SetFunctionTemplate(&g_wrapper_info, templ); 98 data->SetFunctionTemplate(&g_wrapper_info, templ);
98 } 99 }
99 return templ; 100 return templ;
100 } 101 }
101 102
102 } // namespace 103 } // namespace
103 104
104 ModuleRegistry::ModuleRegistry(Isolate* isolate) 105 ModuleRegistry::ModuleRegistry(Isolate* isolate)
105 : modules_(isolate, Object::New(isolate)) { 106 : modules_(isolate, Object::New(isolate)) {
106 } 107 }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 for (size_t i = 0; i < pending_modules.size(); ++i) { 280 for (size_t i = 0; i < pending_modules.size(); ++i) {
280 std::unique_ptr<PendingModule> pending(pending_modules[i]); 281 std::unique_ptr<PendingModule> pending(pending_modules[i]);
281 pending_modules[i] = NULL; 282 pending_modules[i] = NULL;
282 if (AttemptToLoad(isolate, std::move(pending))) 283 if (AttemptToLoad(isolate, std::move(pending)))
283 keep_trying = true; 284 keep_trying = true;
284 } 285 }
285 } 286 }
286 } 287 }
287 288
288 } // namespace gin 289 } // namespace gin
OLDNEW
« no previous file with comments | « gin/function_template.h ('k') | mojo/public/js/validation_unittests.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698