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

Unified Diff: src/api.cc

Issue 70163002: Add explicit Isolate parameter to External::New (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 | « samples/process.cc ('k') | test/cctest/test-accessors.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 401007b4359b6c86c4184dd9183c561adb37a58f..c1d3d1be9eaba4fb581511e564c0accd3ce3819c 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -5369,17 +5369,22 @@ bool FunctionTemplate::HasInstance(v8::Handle<v8::Value> value) {
}
-Local<External> v8::External::New(void* value) {
+Local<External> v8::External::New(Isolate* isolate, void* value) {
STATIC_ASSERT(sizeof(value) == sizeof(i::Address));
- i::Isolate* isolate = i::Isolate::Current();
- EnsureInitializedForIsolate(isolate, "v8::External::New()");
- LOG_API(isolate, "External::New");
- ENTER_V8(isolate);
- i::Handle<i::JSObject> external = isolate->factory()->NewExternal(value);
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ EnsureInitializedForIsolate(i_isolate, "v8::External::New()");
+ LOG_API(i_isolate, "External::New");
+ ENTER_V8(i_isolate);
+ i::Handle<i::JSObject> external = i_isolate->factory()->NewExternal(value);
return Utils::ExternalToLocal(external);
}
+Local<External> v8::External::New(void* value) {
+ return v8::External::New(Isolate::GetCurrent(), value);
+}
+
+
void* External::Value() const {
return ExternalValue(*Utils::OpenHandle(this));
}
« no previous file with comments | « samples/process.cc ('k') | test/cctest/test-accessors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698