[Webkit-unassigned] [Bug 27628] [v8] Simplify weak handlers callback
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jul 23 19:36:12 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27628
--- Comment #3 from anton muhin <antonm at chromium.org> 2009-07-23 19:36:11 PDT ---
(From update of attachment 33390)
> Index: third_party/WebKit/WebCore/ChangeLog
> ===================================================================
> --- third_party/WebKit/WebCore/ChangeLog (revision 46295)
> +++ third_party/WebKit/WebCore/ChangeLog (working copy)
> @@ -1,3 +1,13 @@
> +2009-07-23 Anton Muhin <antonm at chromium.org>
> +
> + Reviewed by NOBODY (OOPS!).
> +
> + Simplify management of Nodes in weak handles callbacks.
> + https://bugs.webkit.org/show_bug.cgi?id=27628
> +
> + * bindings/v8/V8DOMMap.cpp:
> + (WebCore::weakNodeCallback):
> +
> 2009-07-23 Dan Bernstein <mitz at apple.com>
>
> Reviewed by Dave Hyatt.
> Index: third_party/WebKit/WebCore/bindings/v8/V8DOMMap.cpp
> ===================================================================
> --- third_party/WebKit/WebCore/bindings/v8/V8DOMMap.cpp (revision 46194)
> +++ third_party/WebKit/WebCore/bindings/v8/V8DOMMap.cpp (working copy)
> @@ -504,9 +504,12 @@ void weakActiveDOMObjectCallback(v8::Per
>
> static void weakNodeCallback(v8::Persistent<v8::Value> v8Object, void* domObject)
> {
> - v8::HandleScope scope;
> - ASSERT(v8Object->IsObject());
> - DOMData::handleWeakObject<Node>(DOMDataStore::DOMNodeMap, v8::Handle<v8::Object>::Cast(v8Object), static_cast<Node*>(domObject));
> + DOMDataStore* store = DOMDataStore::allStores()[0];
> + DOMDataStore::InternalDOMWrapperMap<Node>& domMap = store->domNodeMap();
> + Node* node = static_cast<Node*>(domObject);
> + v8Object.Dispose();
> + domMap.impl().remove(node);
> + node->deref(); // Nobody overrides Node::deref so it's safe
> }
>
> #if ENABLE(SVG)
The code to retrieve DOM Node map should be merged with Adam's patch obviously.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list