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

Unified Diff: Source/bindings/v8/custom/V8CustomEventCustom.cpp

Issue 23637014: Have V8HiddenPropertyName static functions take an isolate in argument (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/V8WindowShell.cpp ('k') | Source/bindings/v8/custom/V8ErrorEventCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8CustomEventCustom.cpp
diff --git a/Source/bindings/v8/custom/V8CustomEventCustom.cpp b/Source/bindings/v8/custom/V8CustomEventCustom.cpp
index 5b5d0ffa9425ca626c13c92f40942056d31b75e0..e5c8f60f00da6bad5d54ea547f3f317dd7ee1a31 100644
--- a/Source/bindings/v8/custom/V8CustomEventCustom.cpp
+++ b/Source/bindings/v8/custom/V8CustomEventCustom.cpp
@@ -43,9 +43,9 @@
namespace WebCore {
-static v8::Handle<v8::Value> cacheState(v8::Handle<v8::Object> customEvent, v8::Handle<v8::Value> detail)
+static v8::Handle<v8::Value> cacheState(v8::Handle<v8::Object> customEvent, v8::Handle<v8::Value> detail, v8::Isolate* isolate)
{
- customEvent->SetHiddenValue(V8HiddenPropertyName::detail(), detail);
+ customEvent->SetHiddenValue(V8HiddenPropertyName::detail(isolate), detail);
return detail;
}
@@ -54,7 +54,7 @@ void V8CustomEvent::detailAttributeGetterCustom(v8::Local<v8::String> name, cons
{
CustomEvent* event = V8CustomEvent::toNative(info.Holder());
- v8::Handle<v8::Value> result = info.Holder()->GetHiddenValue(V8HiddenPropertyName::detail());
+ v8::Handle<v8::Value> result = info.Holder()->GetHiddenValue(V8HiddenPropertyName::detail(info.GetIsolate()));
if (!result.IsEmpty()) {
v8SetReturnValue(info, result);
@@ -64,18 +64,18 @@ void V8CustomEvent::detailAttributeGetterCustom(v8::Local<v8::String> name, cons
if (!event->serializedDetail()) {
// If we're in an isolated world and the event was created in the main world,
// we need to find the 'detail' property on the main world wrapper and clone it.
- v8::Local<v8::Value> mainWorldDetail = getHiddenValueFromMainWorldWrapper(info.GetIsolate(), event, V8HiddenPropertyName::detail());
+ v8::Local<v8::Value> mainWorldDetail = getHiddenValueFromMainWorldWrapper(info.GetIsolate(), event, V8HiddenPropertyName::detail(info.GetIsolate()));
if (!mainWorldDetail.IsEmpty())
event->setSerializedDetail(SerializedScriptValue::createAndSwallowExceptions(mainWorldDetail, info.GetIsolate()));
}
if (event->serializedDetail()) {
result = event->serializedDetail()->deserialize();
- v8SetReturnValue(info, cacheState(info.Holder(), result));
+ v8SetReturnValue(info, cacheState(info.Holder(), result, info.GetIsolate()));
return;
}
- v8SetReturnValue(info, cacheState(info.Holder(), v8::Null(info.GetIsolate())));
+ v8SetReturnValue(info, cacheState(info.Holder(), v8::Null(info.GetIsolate()), info.GetIsolate()));
}
void V8CustomEvent::initCustomEventMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
@@ -91,7 +91,7 @@ void V8CustomEvent::initCustomEventMethodCustom(const v8::FunctionCallbackInfo<v
event->initEvent(typeArg, canBubbleArg, cancelableArg);
if (!detailsArg.IsEmpty()) {
- args.Holder()->SetHiddenValue(V8HiddenPropertyName::detail(), detailsArg);
+ args.Holder()->SetHiddenValue(V8HiddenPropertyName::detail(args.GetIsolate()), detailsArg);
if (isolatedWorldForIsolate(args.GetIsolate()))
event->setSerializedDetail(SerializedScriptValue::createAndSwallowExceptions(detailsArg, args.GetIsolate()));
}
« no previous file with comments | « Source/bindings/v8/V8WindowShell.cpp ('k') | Source/bindings/v8/custom/V8ErrorEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698