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

Unified Diff: Source/bindings/v8/custom/V8PopStateEventCustom.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/custom/V8MessageEventCustom.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.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 6eee6c1e294dbe097edc016ac763747a62bc5b74..c27ffc120d11acf6d7968513e762614394b4968d 100644
--- a/Source/bindings/v8/custom/V8PopStateEventCustom.cpp
+++ b/Source/bindings/v8/custom/V8PopStateEventCustom.cpp
@@ -40,15 +40,15 @@
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)
+static v8::Handle<v8::Value> cacheState(v8::Handle<v8::Object> popStateEvent, v8::Handle<v8::Value> state, v8::Isolate* isolate)
{
- popStateEvent->SetHiddenValue(V8HiddenPropertyName::state(), state);
+ popStateEvent->SetHiddenValue(V8HiddenPropertyName::state(isolate), state);
return state;
}
void V8PopStateEvent::stateAttributeGetterCustom(v8::Local<v8::String> name, const v8::PropertyCallbackInfo<v8::Value>& info)
{
- v8::Handle<v8::Value> result = info.Holder()->GetHiddenValue(V8HiddenPropertyName::state());
+ v8::Handle<v8::Value> result = info.Holder()->GetHiddenValue(V8HiddenPropertyName::state(info.GetIsolate()));
if (!result.IsEmpty()) {
v8SetReturnValue(info, result);
@@ -61,7 +61,7 @@ void V8PopStateEvent::stateAttributeGetterCustom(v8::Local<v8::String> name, con
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());
+ v8::Local<v8::Value> mainWorldState = getHiddenValueFromMainWorldWrapper(info.GetIsolate(), event, V8HiddenPropertyName::state(info.GetIsolate()));
if (!mainWorldState.IsEmpty())
event->setSerializedState(SerializedScriptValue::createAndSwallowExceptions(mainWorldState, info.GetIsolate()));
}
@@ -69,7 +69,7 @@ void V8PopStateEvent::stateAttributeGetterCustom(v8::Local<v8::String> name, con
result = event->serializedState()->deserialize();
else
result = v8::Null(info.GetIsolate());
- v8SetReturnValue(info, cacheState(info.Holder(), result));
+ v8SetReturnValue(info, cacheState(info.Holder(), result, info.GetIsolate()));
return;
}
@@ -84,19 +84,19 @@ void V8PopStateEvent::stateAttributeGetterCustom(v8::Local<v8::String> name, con
if (isSameState) {
v8::Handle<v8::Object> v8History = toV8(history, info.Holder(), info.GetIsolate()).As<v8::Object>();
if (!history->stateChanged()) {
- result = v8History->GetHiddenValue(V8HiddenPropertyName::state());
+ result = v8History->GetHiddenValue(V8HiddenPropertyName::state(info.GetIsolate()));
if (!result.IsEmpty()) {
- v8SetReturnValue(info, cacheState(info.Holder(), result));
+ v8SetReturnValue(info, cacheState(info.Holder(), result, info.GetIsolate()));
return;
}
}
result = event->serializedState()->deserialize(info.GetIsolate());
- v8History->SetHiddenValue(V8HiddenPropertyName::state(), result);
+ v8History->SetHiddenValue(V8HiddenPropertyName::state(info.GetIsolate()), result);
} else {
result = event->serializedState()->deserialize(info.GetIsolate());
}
- v8SetReturnValue(info, cacheState(info.Holder(), result));
+ v8SetReturnValue(info, cacheState(info.Holder(), result, info.GetIsolate()));
}
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/custom/V8MessageEventCustom.cpp ('k') | Source/bindings/v8/custom/V8WindowCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698