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

Unified Diff: Source/bindings/core/v8/custom/V8HistoryCustom.cpp

Issue 1019453002: IDL: Add [Custom=CallEpilogue] to eliminate CG special cases (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix after rebase Created 5 years, 9 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/core/v8/custom/V8HistoryCustom.cpp
diff --git a/Source/bindings/core/v8/custom/V8HistoryCustom.cpp b/Source/bindings/core/v8/custom/V8HistoryCustom.cpp
index 3dad3bbc476f1599d9994493c0aaa73363ba6e2d..6f9dcaa5d6faed6eb1d522af439b8cf7c22ebdb2 100644
--- a/Source/bindings/core/v8/custom/V8HistoryCustom.cpp
+++ b/Source/bindings/core/v8/custom/V8HistoryCustom.cpp
@@ -42,50 +42,14 @@
namespace blink {
-void V8History::pushStateMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
+void V8History::pushStateMethodEpilogueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, History*)
{
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "pushState", "History", info.Holder(), info.GetIsolate());
-
- if (UNLIKELY(info.Length() < 2)) {
- setMinimumArityTypeError(exceptionState, 2, info.Length());
- exceptionState.throwIfNeeded();
- return;
- }
-
- RefPtr<SerializedScriptValue> historyState = SerializedScriptValueFactory::instance().create(info[0], 0, 0, exceptionState, info.GetIsolate());
- if (exceptionState.throwIfNeeded())
- return;
-
- TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, title, info[1]);
- TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, url, info[2]);
-
- History* history = V8History::toImpl(info.Holder());
- history->stateObjectAdded(historyState.release(), title, url, FrameLoadTypeStandard, exceptionState);
V8HiddenValue::deleteHiddenValue(info.GetIsolate(), info.Holder(), V8HiddenValue::state(info.GetIsolate()));
- exceptionState.throwIfNeeded();
}
-void V8History::replaceStateMethodCustom(const v8::FunctionCallbackInfo<v8::Value>& info)
+void V8History::replaceStateMethodEpilogueCustom(const v8::FunctionCallbackInfo<v8::Value>& info, History*)
{
- ExceptionState exceptionState(ExceptionState::ExecutionContext, "replaceState", "History", info.Holder(), info.GetIsolate());
-
- if (UNLIKELY(info.Length() < 2)) {
- setMinimumArityTypeError(exceptionState, 2, info.Length());
- exceptionState.throwIfNeeded();
- return;
- }
-
- RefPtr<SerializedScriptValue> historyState = SerializedScriptValueFactory::instance().create(info[0], 0, 0, exceptionState, info.GetIsolate());
- if (exceptionState.throwIfNeeded())
- return;
-
- TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, title, info[1]);
- TOSTRING_VOID(V8StringResource<TreatNullAndUndefinedAsNullString>, url, info[2]);
-
- History* history = V8History::toImpl(info.Holder());
- history->stateObjectAdded(historyState.release(), title, url, FrameLoadTypeRedirectWithLockedBackForwardList, exceptionState);
V8HiddenValue::deleteHiddenValue(info.GetIsolate(), info.Holder(), V8HiddenValue::state(info.GetIsolate()));
- exceptionState.throwIfNeeded();
}
} // namespace blink
« no previous file with comments | « Source/bindings/core/v8/custom/V8EventTargetCustom.cpp ('k') | Source/bindings/core/v8/custom/V8MediaQueryListCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698