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

Unified Diff: src/api.cc

Issue 124943004: Prepare removal of ObjectTemplate::New without Isolate parameter. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Do not remove ObjectTemplate::New() yet. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/shell.cc ('k') | src/d8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 5a35cb682c05b4c7aa1c19513ea668d2018f9816..98813e0d536a6cac54ab6277eb967c02a47a7d6c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -943,12 +943,13 @@ static void InitializeFunctionTemplate(
Local<ObjectTemplate> FunctionTemplate::PrototypeTemplate() {
- i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate();
- ENTER_V8(isolate);
+ i::Isolate* i_isolate = Utils::OpenHandle(this)->GetIsolate();
+ ENTER_V8(i_isolate);
i::Handle<i::Object> result(Utils::OpenHandle(this)->prototype_template(),
- isolate);
+ i_isolate);
if (result->IsUndefined()) {
- result = Utils::OpenHandle(*ObjectTemplate::New());
+ v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(i_isolate);
+ result = Utils::OpenHandle(*ObjectTemplate::New(isolate));
Utils::OpenHandle(this)->set_prototype_template(*result);
}
return ToApiHandle<ObjectTemplate>(result);
@@ -5148,7 +5149,8 @@ static i::Handle<i::Context> CreateEnvironment(
global_constructor = EnsureConstructor(isolate, *global_template);
// Create a fresh template for the global proxy object.
- proxy_template = ObjectTemplate::New();
+ proxy_template = ObjectTemplate::New(
+ reinterpret_cast<v8::Isolate*>(isolate));
proxy_constructor = EnsureConstructor(isolate, *proxy_template);
// Set the global template to be the prototype template of
« no previous file with comments | « samples/shell.cc ('k') | src/d8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698