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

Unified Diff: Source/bindings/v8/custom/V8PopStateEventCustom.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
« no previous file with comments | « Source/bindings/v8/custom/V8MessageEventCustom.cpp ('k') | Source/bindings/v8/custom/V8PromiseCustom.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8PopStateEventCustom.cpp
diff --git a/Source/bindings/v8/custom/V8PopStateEventCustom.cpp b/Source/bindings/v8/custom/V8PopStateEventCustom.cpp
index 8a7b790822ca3b7c967f6927f62d42574c1be5eb..e9aa93300e70523199721388aff3b96c36f9b56a 100644
--- a/Source/bindings/v8/custom/V8PopStateEventCustom.cpp
+++ b/Source/bindings/v8/custom/V8PopStateEventCustom.cpp
@@ -33,7 +33,6 @@
#include "V8History.h"
#include "bindings/v8/SerializedScriptValue.h"
-#include "bindings/v8/V8HiddenPropertyName.h"
#include "core/events/PopStateEvent.h"
#include "core/frame/History.h"
@@ -42,13 +41,13 @@ namespace WebCore {
// Save the state value to a hidden attribute in the V8PopStateEvent, and return it, for convenience.
static v8::Handle<v8::Value> cacheState(v8::Handle<v8::Object> popStateEvent, v8::Handle<v8::Value> state, v8::Isolate* isolate)
{
- popStateEvent->SetHiddenValue(V8HiddenPropertyName::state(isolate), state);
+ setHiddenValue(isolate, popStateEvent, "state", state);
return state;
}
void V8PopStateEvent::stateAttributeGetterCustom(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- v8::Handle<v8::Value> result = info.Holder()->GetHiddenValue(V8HiddenPropertyName::state(info.GetIsolate()));
+ v8::Handle<v8::Value> result = getHiddenValue(info.GetIsolate(), info.Holder(), "state");
if (!result.IsEmpty()) {
v8SetReturnValue(info, result);
@@ -61,7 +60,7 @@ void V8PopStateEvent::stateAttributeGetterCustom(const v8::PropertyCallbackInfo<
if (!event->serializedState()) {
// If we're in an isolated world and the event was created in the main world,
// we need to find the 'state' property on the main world wrapper and clone it.
- v8::Local<v8::Value> mainWorldState = getHiddenValueFromMainWorldWrapper(info.GetIsolate(), event, V8HiddenPropertyName::state(info.GetIsolate()));
+ v8::Local<v8::Value> mainWorldState = getHiddenValueFromMainWorldWrapper(info.GetIsolate(), event, "state");
if (!mainWorldState.IsEmpty())
event->setSerializedState(SerializedScriptValue::createAndSwallowExceptions(mainWorldState, info.GetIsolate()));
}
@@ -84,14 +83,14 @@ void V8PopStateEvent::stateAttributeGetterCustom(const v8::PropertyCallbackInfo<
if (isSameState) {
v8::Handle<v8::Object> v8History = toV8(history, info.Holder(), info.GetIsolate()).As<v8::Object>();
if (!history->stateChanged()) {
- result = v8History->GetHiddenValue(V8HiddenPropertyName::state(info.GetIsolate()));
+ result = getHiddenValue(info.GetIsolate(), v8History, "state");
if (!result.IsEmpty()) {
v8SetReturnValue(info, cacheState(info.Holder(), result, info.GetIsolate()));
return;
}
}
result = event->serializedState()->deserialize(info.GetIsolate());
- v8History->SetHiddenValue(V8HiddenPropertyName::state(info.GetIsolate()), result);
+ setHiddenValue(info.GetIsolate(), v8History, "state", result);
} else {
result = event->serializedState()->deserialize(info.GetIsolate());
}
« no previous file with comments | « Source/bindings/v8/custom/V8MessageEventCustom.cpp ('k') | Source/bindings/v8/custom/V8PromiseCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698