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

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

Issue 135843008: Remove V8HiddenPropertyName (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
Index: Source/bindings/v8/custom/V8CustomEventCustom.cpp
diff --git a/Source/bindings/v8/custom/V8CustomEventCustom.cpp b/Source/bindings/v8/custom/V8CustomEventCustom.cpp
index 143f0cac326d539b679ce73d3f89502652d12420..0bac49f0c22c876385bceedf93c64978b86c9b4a 100644
--- a/Source/bindings/v8/custom/V8CustomEventCustom.cpp
+++ b/Source/bindings/v8/custom/V8CustomEventCustom.cpp
@@ -38,14 +38,13 @@
#include "bindings/v8/SerializedScriptValue.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8DOMWrapper.h"
-#include "bindings/v8/V8HiddenPropertyName.h"
#include "core/dom/ContextFeatures.h"
namespace WebCore {
static v8::Handle<v8::Value> cacheState(v8::Handle<v8::Object> customEvent, v8::Handle<v8::Value> detail, v8::Isolate* isolate)
{
- customEvent->SetHiddenValue(V8HiddenPropertyName::detail(isolate), detail);
+ setHiddenValue(customEvent, v8AtomicString(isolate, "detail"), detail);
return detail;
}
@@ -54,7 +53,7 @@ void V8CustomEvent::detailAttributeGetterCustom(const v8::PropertyCallbackInfo<v
{
CustomEvent* event = V8CustomEvent::toNative(info.Holder());
- v8::Handle<v8::Value> result = info.Holder()->GetHiddenValue(V8HiddenPropertyName::detail(info.GetIsolate()));
+ v8::Handle<v8::Value> result = getHiddenValue(info.Holder(), v8AtomicString(info.GetIsolate(), "detail"));
if (!result.IsEmpty()) {
v8SetReturnValue(info, result);
@@ -64,7 +63,7 @@ void V8CustomEvent::detailAttributeGetterCustom(const v8::PropertyCallbackInfo<v
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(info.GetIsolate()));
+ v8::Local<v8::Value> mainWorldDetail = getHiddenValueFromMainWorldWrapper(info.GetIsolate(), event, v8AtomicString(info.GetIsolate(), "detail"));
if (!mainWorldDetail.IsEmpty())
event->setSerializedDetail(SerializedScriptValue::createAndSwallowExceptions(mainWorldDetail, info.GetIsolate()));
}
@@ -91,7 +90,7 @@ void V8CustomEvent::initCustomEventMethodCustom(const v8::FunctionCallbackInfo<v
event->initEvent(typeArg, canBubbleArg, cancelableArg);
if (!detailsArg.IsEmpty()) {
- info.Holder()->SetHiddenValue(V8HiddenPropertyName::detail(info.GetIsolate()), detailsArg);
+ setHiddenValue(info.Holder(), v8AtomicString(info.GetIsolate(), "detail"), detailsArg);
if (isolatedWorldForIsolate(info.GetIsolate()))
event->setSerializedDetail(SerializedScriptValue::createAndSwallowExceptions(detailsArg, info.GetIsolate()));
}

Powered by Google App Engine
This is Rietveld 408576698