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

Unified Diff: Source/bindings/v8/V8HiddenPropertyName.cpp

Issue 24218002: Avoid calling v8::Isolate::GetCurrent() twice in V8HiddenPropertyName (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | « Source/bindings/v8/V8HiddenPropertyName.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8HiddenPropertyName.cpp
diff --git a/Source/bindings/v8/V8HiddenPropertyName.cpp b/Source/bindings/v8/V8HiddenPropertyName.cpp
index 2da72d36f5ec031ffeeea2b10996ae3da4c54d48..776de512ade033d55defe851919672914413c8da 100644
--- a/Source/bindings/v8/V8HiddenPropertyName.cpp
+++ b/Source/bindings/v8/V8HiddenPropertyName.cpp
@@ -49,7 +49,7 @@ v8::Handle<v8::String> V8HiddenPropertyName::name() \
v8::Isolate* isolate = v8::Isolate::GetCurrent(); \
V8HiddenPropertyName* hiddenPropertyName = V8PerIsolateData::from(isolate)->hiddenPropertyName(); \
if (hiddenPropertyName->m_##name.IsEmpty()) { \
- createString(V8_HIDDEN_PROPERTY_PREFIX V8_AS_STRING(name), &(hiddenPropertyName->m_##name)); \
+ createString(V8_HIDDEN_PROPERTY_PREFIX V8_AS_STRING(name), &(hiddenPropertyName->m_##name), isolate); \
} \
return v8::Local<v8::String>::New(isolate, hiddenPropertyName->m_##name); \
}
@@ -71,9 +71,8 @@ void V8HiddenPropertyName::setNamedHiddenReference(v8::Handle<v8::Object> parent
parent->SetHiddenValue(hiddenReferenceName(name, strlen(name)), child);
}
-void V8HiddenPropertyName::createString(const char* key, v8::Persistent<v8::String>* handle)
+void V8HiddenPropertyName::createString(const char* key, v8::Persistent<v8::String>* handle, v8::Isolate* isolate)
{
- v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
handle->Reset(isolate, v8::String::NewSymbol(key));
}
« no previous file with comments | « Source/bindings/v8/V8HiddenPropertyName.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698