summaryrefslogtreecommitdiff
path: root/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp')
-rw-r--r--Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp b/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp
index d32b44ffc..e75b94476 100644
--- a/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp
+++ b/Source/WebCore/bindings/v8/custom/V8WebKitMutationObserverCustom.cpp
@@ -34,8 +34,8 @@
#include "V8WebKitMutationObserver.h"
+#include "Dictionary.h"
#include "ExceptionCode.h"
-#include "OptionsObject.h"
#include "V8Binding.h"
#include "V8BindingMacros.h"
#include "V8DOMWrapper.h"
@@ -61,7 +61,7 @@ v8::Handle<v8::Value> V8WebKitMutationObserver::constructorCallback(const v8::Ar
return args.Holder();
if (args.Length() < 1)
- return throwError("Not enough arguments", V8Proxy::TypeError);
+ return V8Proxy::throwNotEnoughArgumentsError();
v8::Local<v8::Value> arg = args[0];
if (!arg->IsObject())
@@ -75,8 +75,7 @@ v8::Handle<v8::Value> V8WebKitMutationObserver::constructorCallback(const v8::Ar
RefPtr<WebKitMutationObserver> observer = WebKitMutationObserver::create(callback.release());
V8DOMWrapper::setDOMWrapper(args.Holder(), &info, observer.get());
- observer->ref();
- V8DOMWrapper::setJSWrapperForDOMObject(observer.get(), v8::Persistent<v8::Object>::New(args.Holder()));
+ V8DOMWrapper::setJSWrapperForDOMObject(observer.release(), v8::Persistent<v8::Object>::New(args.Holder()));
return args.Holder();
}
@@ -84,14 +83,14 @@ v8::Handle<v8::Value> V8WebKitMutationObserver::observeCallback(const v8::Argume
{
INC_STATS("DOM.WebKitMutationObserver.observe");
if (args.Length() < 2)
- return throwError("Not enough arguments", V8Proxy::TypeError);
+ return V8Proxy::throwNotEnoughArgumentsError();
WebKitMutationObserver* imp = V8WebKitMutationObserver::toNative(args.Holder());
EXCEPTION_BLOCK(Node*, target, V8Node::HasInstance(args[0]) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(args[0])) : 0);
if (!args[1]->IsObject())
return throwError(TYPE_MISMATCH_ERR);
- OptionsObject optionsObject(args[1]);
+ Dictionary optionsObject(args[1]);
unsigned options = 0;
HashSet<AtomicString> attributeFilter;
bool option;
@@ -113,7 +112,7 @@ v8::Handle<v8::Value> V8WebKitMutationObserver::observeCallback(const v8::Argume
ExceptionCode ec = 0;
imp->observe(target, options, attributeFilter, ec);
if (ec)
- V8Proxy::setDOMException(ec);
+ V8Proxy::setDOMException(ec, args.GetIsolate());
return v8::Handle<v8::Value>();
}