Commit 05fe133a authored by jchaffraix@webkit.org's avatar jchaffraix@webkit.org

[V8] V8WebKitPoint::constructorCallback leaks

https://bugs.webkit.org/show_bug.cgi?id=67865

Reviewed by Adam Barth.

Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind.

* bindings/v8/custom/V8WebKitPointConstructor.cpp:
(WebCore::V8WebKitPoint::constructorCallback): Changed the code
to use a RefPtr (per our usual style). Also use toV8 that will
take care of properly wrapping the object.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c51f9c3b
2011-09-09 Julien Chaffraix <jchaffraix@webkit.org>
[V8] V8WebKitPoint::constructorCallback leaks
https://bugs.webkit.org/show_bug.cgi?id=67865
Reviewed by Adam Barth.
Covered by fast/js/instanceof-XMLHttpRequest.html under Valgrind.
* bindings/v8/custom/V8WebKitPointConstructor.cpp:
(WebCore::V8WebKitPoint::constructorCallback): Changed the code
to use a RefPtr (per our usual style). Also use toV8 that will
take care of properly wrapping the object.
2011-09-09 Chris Rogers <crogers@google.com>
HRTFDatabaseLoader should not call WTF::waitForThreadCompletion() more than once
......@@ -61,10 +61,9 @@ v8::Handle<v8::Value> V8WebKitPoint::constructorCallback(const v8::Arguments& ar
y = 0;
}
}
PassRefPtr<WebKitPoint> point = WebKitPoint::create(x, y);
point->ref();
RefPtr<WebKitPoint> point = WebKitPoint::create(x, y);
V8DOMWrapper::setDOMWrapper(args.Holder(), &info, point.get());
return args.Holder();
return toV8(point.release(), args.Holder());
}
} // namespace WebCore
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment