summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp')
-rw-r--r--WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp b/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
index 46e9929..cdb160d 100644
--- a/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8PopStateEventCustom.cpp
@@ -35,6 +35,8 @@
#include "SerializedScriptValue.h"
#include "V8Proxy.h"
+#include <v8.h>
+
namespace WebCore {
v8::Handle<v8::Value> V8PopStateEvent::initPopStateEventCallback(const v8::Arguments& args)
@@ -44,7 +46,11 @@ v8::Handle<v8::Value> V8PopStateEvent::initPopStateEventCallback(const v8::Argum
String typeArg = v8ValueToWebCoreString(args[0]);
bool canBubbleArg = args[1]->BooleanValue();
bool cancelableArg = args[2]->BooleanValue();
- RefPtr<SerializedScriptValue> stateArg = SerializedScriptValue::create(args[3]);
+
+ bool didThrow = false;
+ RefPtr<SerializedScriptValue> stateArg = SerializedScriptValue::create(args[3], didThrow);
+ if (didThrow)
+ return v8::Undefined();
PopStateEvent* event = V8PopStateEvent::toNative(args.Holder());
event->initPopStateEvent(typeArg, canBubbleArg, cancelableArg, stateArg.release());