Changeset 215487 in webkit
- Timestamp:
- Apr 18, 2017 4:34:17 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r215486 r215487 1 2017-04-18 Brent Fulgham <bfulgham@apple.com> 2 3 JSEventListener::m_isolatedWorld should be a Ref 4 https://bugs.webkit.org/show_bug.cgi?id=170910 5 <rdar://problem/30470332> 6 7 Reviewed by Alex Christensen. 8 9 Since m_isolatedWorld should never be nullptr, change the implementation of m_isolatedWorld 10 from a RefPtr to a Ref, and adjust the various call sites to support this change. 11 12 This should help us catch any changes that permit the isolatedWorld to be set to nullptr. 13 14 No new tests since there should be no change in behavior. 15 16 * bindings/js/JSEventListener.cpp: 17 (WebCore::JSEventListener::JSEventListener): 18 (WebCore::JSEventListener::initializeJSFunction): 19 (WebCore::JSEventListener::handleEvent): 20 * bindings/js/JSEventListener.h: 21 (WebCore::JSEventListener::cast): 22 (WebCore::JSEventListener::isolatedWorld): 23 (WebCore::JSEventListener::jsFunction): 24 1 25 2017-04-18 Brent Fulgham <bfulgham@apple.com> 2 26 -
trunk/Source/WebCore/bindings/js/JSEventListener.cpp
r215486 r215487 48 48 , m_wrapper(wrapper) 49 49 , m_isAttribute(isAttribute) 50 , m_isolatedWorld( &isolatedWorld)50 , m_isolatedWorld(isolatedWorld) 51 51 { 52 52 if (wrapper) { … … 102 102 return; 103 103 104 JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(scriptExecutionContext, *m_isolatedWorld);104 JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(scriptExecutionContext, m_isolatedWorld); 105 105 if (!globalObject) 106 106 return; -
trunk/Source/WebCore/bindings/js/JSEventListener.h
r215486 r215487 56 56 return listener->type() == JSEventListenerType 57 57 ? static_cast<const JSEventListener*>(listener) 58 : 0;58 : nullptr; 59 59 } 60 60 … … 67 67 68 68 JSC::JSObject* jsFunction(ScriptExecutionContext*) const; 69 DOMWrapperWorld& isolatedWorld() const { return *m_isolatedWorld; }69 DOMWrapperWorld& isolatedWorld() const { return m_isolatedWorld; } 70 70 71 71 JSC::JSObject* wrapper() const { return m_wrapper.get(); } … … 89 89 90 90 bool m_isAttribute; 91 Ref Ptr<DOMWrapperWorld> m_isolatedWorld;91 Ref<DOMWrapperWorld> m_isolatedWorld; 92 92 }; 93 93 … … 130 130 // If m_wrapper is 0, then m_jsFunction is zombied, and should never be accessed. 131 131 if (!m_wrapper) 132 return 0;132 return nullptr; 133 133 134 134 // Try to verify that m_jsFunction wasn't recycled. (Not exact, since an
Note: See TracChangeset
for help on using the changeset viewer.