Skip to content

Commit 0c689bf

Browse files
committed
2011-04-14 Geoffrey Garen <ggaren@apple.com>
Reviewed by Oliver Hunt. Complicated hash table is complicated https://bugs.webkit.org/show_bug.cgi?id=58631 Now that we use the opaque roots system to track node wrapper lifetime, we can remove a lot of complicated hash-tablery that used to do the same. Now normal world node wrappers are just set as direct properties of ScriptWrappable, while isolated world node wrappers and other DOM object wrappers are stored in a shared, per-world hash table. In addition to reducing complexity, this makes DOM wrapper allocation 1.6X faster (tested with scratch-gc-dom3.html), and it reduces the memory footprint of normal world wrappers by ~2/3, and isolated world wrappers by ~1/3. * WebCore.exp.in: Paying the patch tithe. * bindings/js/DOMWrapperWorld.cpp: (WebCore::DOMWrapperWorld::~DOMWrapperWorld): (WebCore::DOMWrapperWorld::clearWrappers): No more per-document hash tables. (WebCore::JSNodeHandleOwner::finalize): Changed to call a helper function, so the code to destroy a wrapper can live next to the code to create one. * bindings/js/DOMWrapperWorld.h: No more per-document hash tables. * bindings/js/JSDOMBinding.cpp: (WebCore::uncacheDOMObjectWrapper): * bindings/js/JSDOMBinding.h: (WebCore::createDOMNodeWrapper): (WebCore::getDOMNodeWrapper): No more per-document hash tables. Added uncacheDOMObjectWrapper to be symmetrical with cacheDOMObjectWrapper. * bindings/js/JSDocumentCustom.cpp: (WebCore::toJS): * bindings/js/JSElementCustom.cpp: (WebCore::toJSNewlyCreated): * bindings/js/JSNodeCustom.cpp: (WebCore::createWrapperInline): Ditto. * bindings/js/JSNodeCustom.h: (WebCore::getCachedDOMNodeWrapper): (WebCore::cacheDOMNodeWrapper): (WebCore::uncacheDOMNodeWrapper): (WebCore::toJS): Implemented the scheme described above. * bindings/js/ScriptWrappable.h: (WebCore::ScriptWrappable::wrapper): (WebCore::ScriptWrappable::setWrapper): (WebCore::ScriptWrappable::clearWrapper): ScriptWrappable needs a handle owner now, since we don't have an extra handle living in a hash table to maintain ownership for us. * dom/Document.cpp: (WebCore::Document::Document): (WebCore::Document::~Document): * dom/Document.h: * dom/Node.cpp: (WebCore::Node::setDocument): No more per-document hash tables. * html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::createImageBuffer): Removed call to hasCachedDOMNodeWrapperUnchecked because that was the old way of doing things, and I was in the mood for getting rid of the old way. It's debatable whether the check was ever a good idea. Even when a <canvas> doesn't have a direct JS wrapper, other JS references can still keep the <canvas> alive. So, it's probably best always to report extra cost. Canonical link: https://commits.webkit.org/73744@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83990 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent e952b07 commit 0c689bf

15 files changed

Lines changed: 121 additions & 190 deletions

Source/WebCore/ChangeLog

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,75 @@
1+
2011-04-14 Geoffrey Garen <ggaren@apple.com>
2+
3+
Reviewed by Oliver Hunt.
4+
5+
Complicated hash table is complicated
6+
https://bugs.webkit.org/show_bug.cgi?id=58631
7+
8+
Now that we use the opaque roots system to track node wrapper lifetime,
9+
we can remove a lot of complicated hash-tablery that used to do the same.
10+
11+
Now normal world node wrappers are just set as direct properties of
12+
ScriptWrappable, while isolated world node wrappers and other DOM object
13+
wrappers are stored in a shared, per-world hash table.
14+
15+
In addition to reducing complexity, this makes DOM wrapper allocation
16+
1.6X faster (tested with scratch-gc-dom3.html), and it reduces the memory
17+
footprint of normal world wrappers by ~2/3, and isolated world wrappers
18+
by ~1/3.
19+
20+
* WebCore.exp.in: Paying the patch tithe.
21+
22+
* bindings/js/DOMWrapperWorld.cpp:
23+
(WebCore::DOMWrapperWorld::~DOMWrapperWorld):
24+
(WebCore::DOMWrapperWorld::clearWrappers): No more per-document hash tables.
25+
26+
(WebCore::JSNodeHandleOwner::finalize): Changed to call a helper function,
27+
so the code to destroy a wrapper can live next to the code to create one.
28+
29+
* bindings/js/DOMWrapperWorld.h: No more per-document hash tables.
30+
31+
* bindings/js/JSDOMBinding.cpp:
32+
(WebCore::uncacheDOMObjectWrapper):
33+
* bindings/js/JSDOMBinding.h:
34+
(WebCore::createDOMNodeWrapper):
35+
(WebCore::getDOMNodeWrapper): No more per-document hash tables.
36+
Added uncacheDOMObjectWrapper to be symmetrical with cacheDOMObjectWrapper.
37+
38+
* bindings/js/JSDocumentCustom.cpp:
39+
(WebCore::toJS):
40+
* bindings/js/JSElementCustom.cpp:
41+
(WebCore::toJSNewlyCreated):
42+
* bindings/js/JSNodeCustom.cpp:
43+
(WebCore::createWrapperInline): Ditto.
44+
45+
* bindings/js/JSNodeCustom.h:
46+
(WebCore::getCachedDOMNodeWrapper):
47+
(WebCore::cacheDOMNodeWrapper):
48+
(WebCore::uncacheDOMNodeWrapper):
49+
(WebCore::toJS): Implemented the scheme described above.
50+
51+
* bindings/js/ScriptWrappable.h:
52+
(WebCore::ScriptWrappable::wrapper):
53+
(WebCore::ScriptWrappable::setWrapper):
54+
(WebCore::ScriptWrappable::clearWrapper): ScriptWrappable needs a handle
55+
owner now, since we don't have an extra handle living in a hash table
56+
to maintain ownership for us.
57+
58+
* dom/Document.cpp:
59+
(WebCore::Document::Document):
60+
(WebCore::Document::~Document):
61+
* dom/Document.h:
62+
* dom/Node.cpp:
63+
(WebCore::Node::setDocument): No more per-document hash tables.
64+
65+
* html/HTMLCanvasElement.cpp:
66+
(WebCore::HTMLCanvasElement::createImageBuffer): Removed call to
67+
hasCachedDOMNodeWrapperUnchecked because that was the old way of doing
68+
things, and I was in the mood for getting rid of the old way. It's
69+
debatable whether the check was ever a good idea. Even when a <canvas>
70+
doesn't have a direct JS wrapper, other JS references can still keep
71+
the <canvas> alive. So, it's probably best always to report extra cost.
72+
173
2011-04-15 Vsevolod Vlasov <vsevik@chromium.org>
274

375
Reviewed by Pavel Feldman.

Source/WebCore/WebCore.exp.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ __ZN7WebCore12SharedBufferD1Ev
297297
__ZN7WebCore12SpellChecker8didCheckEiRKN3WTF6VectorINS_18TextCheckingResultELm0EEE
298298
__ZN7WebCore12TextEncodingC1ERKN3WTF6StringE
299299
__ZN7WebCore12TextIterator11rangeLengthEPKNS_5RangeEb
300-
__ZN7WebCore12TextIterator26rangeFromLocationAndLengthEPNS_7ElementEiib
301300
__ZN7WebCore12TextIterator26locationAndLengthFromRangeEPKNS_5RangeERmS4_
301+
__ZN7WebCore12TextIterator26rangeFromLocationAndLengthEPNS_7ElementEiib
302302
__ZN7WebCore12TextIterator7advanceEv
303303
__ZN7WebCore12TextIterator8subrangeEPNS_5RangeEii
304304
__ZN7WebCore12TextIteratorC1EPKNS_5RangeENS_20TextIteratorBehaviorE
@@ -350,6 +350,7 @@ __ZN7WebCore14DocumentLoaderC2ERKNS_15ResourceRequestERKNS_14SubstituteDataE
350350
__ZN7WebCore14DocumentLoaderD2Ev
351351
__ZN7WebCore14DocumentWriter11setEncodingERKN3WTF6StringEb
352352
__ZN7WebCore14ResourceHandle12releaseProxyEv
353+
__ZN7WebCore25getCachedDOMObjectWrapperEPN3JSC9ExecStateEPv
353354
__ZN7WebCore14ResourceHandle20forceContentSniffingEv
354355
__ZN7WebCore14ResourceLoader14cancelledErrorEv
355356
__ZN7WebCore14ResourceLoader19setShouldBufferDataEb
@@ -812,7 +813,6 @@ __ZN7WebCore8Document13svgExtensionsEv
812813
__ZN7WebCore8Document14setFocusedNodeEN3WTF10PassRefPtrINS_4NodeEEE
813814
__ZN7WebCore8Document16isPageBoxVisibleEi
814815
__ZN7WebCore8Document17getFocusableNodesERN3WTF6VectorINS1_6RefPtrINS_4NodeEEELm0EEE
815-
__ZN7WebCore8Document18createWrapperCacheEPNS_15DOMWrapperWorldE
816816
__ZN7WebCore8Document19accessSVGExtensionsEv
817817
__ZN7WebCore8Document20styleSelectorChangedENS_23StyleSelectorUpdateFlagE
818818
__ZN7WebCore8Document22createDocumentFragmentEv

Source/WebCore/bindings/js/DOMWrapperWorld.cpp

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -161,26 +161,12 @@ DOMWrapperWorld::~DOMWrapperWorld()
161161
JSGlobalData::ClientData* clientData = m_globalData->clientData;
162162
ASSERT(clientData);
163163
static_cast<WebCoreJSClientData*>(clientData)->forgetWorld(this);
164-
165-
// These items are created lazily.
166-
while (!m_documentsWithWrapperCaches.isEmpty())
167-
(*m_documentsWithWrapperCaches.begin())->destroyWrapperCache(this);
168-
169-
while (!m_scriptControllersWithWindowShells.isEmpty())
170-
(*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(this);
171164
}
172165

173166
void DOMWrapperWorld::clearWrappers()
174167
{
175168
m_wrappers.clear();
176169
m_stringCache.clear();
177-
178-
// These items are created lazily.
179-
while (!m_documentsWithWrapperCaches.isEmpty())
180-
(*m_documentsWithWrapperCaches.begin())->destroyWrapperCache(this);
181-
182-
while (!m_scriptControllersWithWindowShells.isEmpty())
183-
(*m_scriptControllersWithWindowShells.begin())->destroyWindowShell(this);
184170
}
185171

186172
DOMWrapperWorld* normalWorld(JSC::JSGlobalData& globalData)
@@ -206,10 +192,7 @@ bool JSNodeHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> han
206192
void JSNodeHandleOwner::finalize(JSC::Handle<JSC::Unknown> handle, void*)
207193
{
208194
JSNode* jsNode = static_cast<JSNode*>(handle.get().asCell());
209-
Node* node = jsNode->impl();
210-
ASSERT(node->document());
211-
ASSERT(node->document()->getWrapperCache(m_world)->find(node)->second == jsNode);
212-
node->document()->getWrapperCache(m_world)->remove(node);
195+
uncacheDOMNodeWrapper(m_world, jsNode->impl(), jsNode);
213196
}
214197

215198
bool DOMObjectHandleOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void*, JSC::MarkStack&)

Source/WebCore/bindings/js/DOMWrapperWorld.h

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@
2222
#ifndef DOMWrapperWorld_h
2323
#define DOMWrapperWorld_h
2424

25-
#include "Document.h"
2625
#include "JSDOMGlobalObject.h"
27-
#include "JSDOMWrapper.h"
2826
#include <runtime/WeakGCMap.h>
2927
#include <wtf/Forward.h>
3028

3129
namespace WebCore {
3230

31+
class DOMObject;
3332
class ScriptController;
3433

3534
typedef HashMap<void*, JSC::Weak<DOMObject> > DOMObjectWrapperMap;
@@ -76,9 +75,6 @@ class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
7675
// Free as much memory held onto by this world as possible.
7776
void clearWrappers();
7877

79-
void didCreateWrapperCache(Document* document) { m_documentsWithWrapperCaches.add(document); }
80-
void didDestroyWrapperCache(Document* document) { m_documentsWithWrapperCaches.remove(document); }
81-
8278
void didCreateWindowShell(ScriptController* scriptController) { m_scriptControllersWithWindowShells.add(scriptController); }
8379
void didDestroyWindowShell(ScriptController* scriptController) { m_scriptControllersWithWindowShells.remove(scriptController); }
8480

@@ -97,7 +93,6 @@ class DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
9793

9894
private:
9995
JSC::JSGlobalData* m_globalData;
100-
HashSet<Document*> m_documentsWithWrapperCaches;
10196
HashSet<ScriptController*> m_scriptControllersWithWindowShells;
10297
bool m_isNormal;
10398
JSNodeHandleOwner m_jsNodeHandleOwner;
@@ -114,19 +109,6 @@ inline DOMWrapperWorld* currentWorld(JSC::ExecState* exec)
114109
return static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->world();
115110
}
116111

117-
// From Document.h
118-
119-
inline Document::JSWrapperCache* Document::getWrapperCache(DOMWrapperWorld* world)
120-
{
121-
if (world->isNormal()) {
122-
if (Document::JSWrapperCache* wrapperCache = m_normalWorldWrapperCache)
123-
return wrapperCache;
124-
ASSERT(!m_wrapperCacheMap.contains(world));
125-
} else if (Document::JSWrapperCache* wrapperCache = m_wrapperCacheMap.get(world))
126-
return wrapperCache;
127-
return createWrapperCache(world);
128-
}
129-
130112
} // namespace WebCore
131113

132114
#endif // DOMWrapperWorld_h

Source/WebCore/bindings/js/JSDOMBinding.cpp

Lines changed: 3 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ namespace WebCore {
9494

9595
using namespace HTMLNames;
9696

97-
typedef Document::JSWrapperCache JSWrapperCache;
98-
typedef Document::JSWrapperCacheMap JSWrapperCacheMap;
99-
10097
class JSGlobalDataWorldIterator {
10198
public:
10299
JSGlobalDataWorldIterator(JSGlobalData* globalData)
@@ -167,31 +164,10 @@ void cacheDOMObjectWrapper(JSC::ExecState* exec, void* objectHandle, DOMObject*
167164
world->m_wrappers.set(objectHandle, Weak<DOMObject>(*world->globalData(), wrapper, world->domObjectHandleOwner()));
168165
}
169166

170-
bool hasCachedDOMNodeWrapperUnchecked(Document* document, Node* node)
171-
{
172-
if (!document)
173-
return hasCachedDOMObjectWrapperUnchecked(JSDOMWindow::commonJSGlobalData(), node);
174-
175-
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
176-
for (JSWrapperCacheMap::iterator iter = wrapperCacheMap.begin(); iter != wrapperCacheMap.end(); ++iter) {
177-
if (iter->second->get(node))
178-
return true;
179-
}
180-
return false;
181-
}
182-
183-
void cacheDOMNodeWrapper(JSC::ExecState* exec, Document* document, Node* node, JSNode* wrapper)
167+
void uncacheDOMObjectWrapper(DOMWrapperWorld* world, void* objectHandle, DOMObject* wrapper)
184168
{
185-
ASSERT(wrapper);
186-
if (!document)
187-
cacheDOMObjectWrapper(exec, node, wrapper);
188-
else
189-
document->getWrapperCache(currentWorld(exec))->set(node, Weak<JSNode>(exec->globalData(), wrapper, currentWorld(exec)->jsNodeHandleOwner()));
190-
191-
if (currentWorld(exec)->isNormal()) {
192-
node->setWrapper(exec->globalData(), wrapper);
193-
ASSERT(node->wrapper() == (document ? document->getWrapperCache(currentWorld(exec))->get(node).get() : domObjectWrapperMapFor(exec).get(node).get()));
194-
}
169+
ASSERT_UNUSED(wrapper, world->m_wrappers.get(objectHandle) == wrapper);
170+
world->m_wrappers.remove(objectHandle);
195171
}
196172

197173
void markActiveObjectsForContext(MarkStack& markStack, JSGlobalData& globalData, ScriptExecutionContext* scriptExecutionContext)
@@ -218,44 +194,6 @@ void markActiveObjectsForContext(MarkStack& markStack, JSGlobalData& globalData,
218194
}
219195
}
220196

221-
typedef std::pair<JSNode*, DOMWrapperWorld*> WrapperAndWorld;
222-
typedef WTF::Vector<WrapperAndWorld, 8> WrapperSet;
223-
224-
static inline void takeWrappers(Node* node, Document* document, WrapperSet& wrapperSet)
225-
{
226-
if (document) {
227-
JSWrapperCacheMap& wrapperCacheMap = document->wrapperCacheMap();
228-
for (JSWrapperCacheMap::iterator iter = wrapperCacheMap.begin(); iter != wrapperCacheMap.end(); ++iter) {
229-
JSNode* wrapper = iter->second->take(node).get();
230-
if (!wrapper)
231-
continue;
232-
wrapperSet.append(WrapperAndWorld(wrapper, iter->first));
233-
}
234-
} else {
235-
for (JSGlobalDataWorldIterator worldIter(JSDOMWindow::commonJSGlobalData()); worldIter; ++worldIter) {
236-
DOMWrapperWorld* world = *worldIter;
237-
if (JSNode* wrapper = static_cast<JSNode*>(world->m_wrappers.take(node).get()))
238-
wrapperSet.append(WrapperAndWorld(wrapper, world));
239-
}
240-
}
241-
}
242-
243-
void updateDOMNodeDocument(Node* node, Document* oldDocument, Document* newDocument)
244-
{
245-
ASSERT(oldDocument != newDocument);
246-
247-
WrapperSet wrapperSet;
248-
takeWrappers(node, oldDocument, wrapperSet);
249-
250-
for (unsigned i = 0; i < wrapperSet.size(); ++i) {
251-
JSNode* wrapper = wrapperSet[i].first;
252-
if (newDocument)
253-
newDocument->getWrapperCache(wrapperSet[i].second)->set(node, Weak<JSNode>(*wrapperSet[i].second->globalData(), wrapper, wrapperSet[i].second->jsNodeHandleOwner()));
254-
else
255-
wrapperSet[i].second->m_wrappers.set(node, Weak<DOMObject>(*wrapperSet[i].second->globalData(), wrapper, wrapperSet[i].second->domObjectHandleOwner()));
256-
}
257-
}
258-
259197
void markDOMObjectWrapper(MarkStack& markStack, JSGlobalData& globalData, void* object)
260198
{
261199
// FIXME: This could be changed to only mark wrappers that are "observable"

Source/WebCore/bindings/js/JSDOMBinding.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ namespace WebCore {
116116
DOMObject* getCachedDOMObjectWrapper(JSC::ExecState*, void* objectHandle);
117117
bool hasCachedDOMObjectWrapper(JSC::JSGlobalData*, void* objectHandle);
118118
void cacheDOMObjectWrapper(JSC::ExecState*, void* objectHandle, DOMObject* wrapper);
119+
void uncacheDOMObjectWrapper(DOMWrapperWorld*, void* objectHandle, DOMObject* wrapper);
119120

120-
JSNode* getCachedDOMNodeWrapper(JSC::ExecState*, Document*, Node*);
121-
void cacheDOMNodeWrapper(JSC::ExecState*, Document*, Node*, JSNode* wrapper);
122-
void updateDOMNodeDocument(Node*, Document* oldDocument, Document* newDocument);
123-
121+
JSNode* getCachedDOMNodeWrapper(JSC::ExecState*, Node*);
122+
void cacheDOMNodeWrapper(JSC::ExecState*, Node*, JSNode* wrapper);
123+
void uncacheDOMNodeWrapper(DOMWrapperWorld*, Node*, JSNode* wrapper);
124+
124125
void markActiveObjectsForContext(JSC::MarkStack&, JSC::JSGlobalData&, ScriptExecutionContext*);
125126
void markDOMObjectWrapper(JSC::MarkStack&, JSC::JSGlobalData& globalData, void* object);
126127
bool hasCachedDOMObjectWrapperUnchecked(JSC::JSGlobalData*, void* objectHandle);
127-
bool hasCachedDOMNodeWrapperUnchecked(Document*, Node*);
128128

129129
JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject*, const JSC::ClassInfo*);
130130
JSC::Structure* cacheDOMStructure(JSDOMGlobalObject*, NonNullPassRefPtr<JSC::Structure>, const JSC::ClassInfo*);
@@ -175,18 +175,18 @@ namespace WebCore {
175175
template<class WrapperClass, class DOMClass> inline JSNode* createDOMNodeWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* node)
176176
{
177177
ASSERT(node);
178-
ASSERT(!getCachedDOMNodeWrapper(exec, node->document(), node));
178+
ASSERT(!getCachedDOMNodeWrapper(exec, node));
179179
WrapperClass* wrapper = new (exec) WrapperClass(getDOMStructure<WrapperClass>(exec, globalObject), globalObject, node);
180180
// FIXME: The entire function can be removed, once we fix caching.
181181
// This function is a one-off hack to make Nodes cache in the right global object.
182-
cacheDOMNodeWrapper(exec, node->document(), node, wrapper);
182+
cacheDOMNodeWrapper(exec, node, wrapper);
183183
return wrapper;
184184
}
185185
template<class WrapperClass, class DOMClass> inline JSC::JSValue getDOMNodeWrapper(JSC::ExecState* exec, JSDOMGlobalObject* globalObject, DOMClass* node)
186186
{
187187
if (!node)
188188
return JSC::jsNull();
189-
if (JSC::JSCell* wrapper = getCachedDOMNodeWrapper(exec, node->document(), node))
189+
if (JSC::JSCell* wrapper = getCachedDOMNodeWrapper(exec, node))
190190
return wrapper;
191191
return createDOMNodeWrapper<WrapperClass>(exec, globalObject, node);
192192
}

Source/WebCore/bindings/js/JSDocumentCustom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ JSValue toJS(ExecState* exec, JSDOMGlobalObject* globalObject, Document* documen
100100
if (!document)
101101
return jsNull();
102102

103-
DOMObject* wrapper = getCachedDOMNodeWrapper(exec, document, document);
103+
DOMObject* wrapper = getCachedDOMNodeWrapper(exec, document);
104104
if (wrapper)
105105
return wrapper;
106106

Source/WebCore/bindings/js/JSElementCustom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ JSValue toJSNewlyCreated(ExecState* exec, JSDOMGlobalObject* globalObject, Eleme
7171
if (!element)
7272
return jsNull();
7373

74-
ASSERT(!getCachedDOMNodeWrapper(exec, element->document(), element));
74+
ASSERT(!getCachedDOMNodeWrapper(exec, element));
7575

7676
JSNode* wrapper;
7777
if (element->isHTMLElement())

Source/WebCore/bindings/js/JSNodeCustom.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void JSNode::markChildren(MarkStack& markStack)
130130
static ALWAYS_INLINE JSValue createWrapperInline(ExecState* exec, JSDOMGlobalObject* globalObject, Node* node)
131131
{
132132
ASSERT(node);
133-
ASSERT(!getCachedDOMNodeWrapper(exec, node->document(), node));
133+
ASSERT(!getCachedDOMNodeWrapper(exec, node));
134134

135135
JSNode* wrapper;
136136
switch (node->nodeType()) {

0 commit comments

Comments
 (0)