Title: [216365] releases/WebKitGTK/webkit-2.16/Source/WebCore
- Revision
- 216365
- Author
- [email protected]
- Date
- 2017-05-08 01:51:21 -0700 (Mon, 08 May 2017)
Log Message
Merge r215487 - JSEventListener::m_isolatedWorld should be a Ref
https://bugs.webkit.org/show_bug.cgi?id=170910
<rdar://problem/30470332>
Reviewed by Alex Christensen.
Since m_isolatedWorld should never be nullptr, change the implementation of m_isolatedWorld
from a RefPtr to a Ref, and adjust the various call sites to support this change.
This should help us catch any changes that permit the isolatedWorld to be set to nullptr.
No new tests since there should be no change in behavior.
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
(WebCore::JSEventListener::initializeJSFunction):
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::cast):
(WebCore::JSEventListener::isolatedWorld):
(WebCore::JSEventListener::jsFunction):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (216364 => 216365)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-05-08 08:47:36 UTC (rev 216364)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-05-08 08:51:21 UTC (rev 216365)
@@ -1,3 +1,27 @@
+2017-04-18 Brent Fulgham <[email protected]>
+
+ JSEventListener::m_isolatedWorld should be a Ref
+ https://bugs.webkit.org/show_bug.cgi?id=170910
+ <rdar://problem/30470332>
+
+ Reviewed by Alex Christensen.
+
+ Since m_isolatedWorld should never be nullptr, change the implementation of m_isolatedWorld
+ from a RefPtr to a Ref, and adjust the various call sites to support this change.
+
+ This should help us catch any changes that permit the isolatedWorld to be set to nullptr.
+
+ No new tests since there should be no change in behavior.
+
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener):
+ (WebCore::JSEventListener::initializeJSFunction):
+ (WebCore::JSEventListener::handleEvent):
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::cast):
+ (WebCore::JSEventListener::isolatedWorld):
+ (WebCore::JSEventListener::jsFunction):
+
2017-04-18 Ryan Haddad <[email protected]>
Rebaseline bindings tests after r215486.
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/bindings/js/JSEventListener.cpp (216364 => 216365)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/bindings/js/JSEventListener.cpp 2017-05-08 08:47:36 UTC (rev 216364)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/bindings/js/JSEventListener.cpp 2017-05-08 08:51:21 UTC (rev 216365)
@@ -47,7 +47,7 @@
: EventListener(JSEventListenerType)
, m_wrapper(wrapper)
, m_isAttribute(isAttribute)
- , m_isolatedWorld(&isolatedWorld)
+ , m_isolatedWorld(isolatedWorld)
{
if (wrapper) {
JSC::Heap::heap(wrapper)->writeBarrier(wrapper, function);
@@ -101,7 +101,7 @@
if (!jsFunction)
return;
- JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(scriptExecutionContext, *m_isolatedWorld);
+ JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(scriptExecutionContext, m_isolatedWorld);
if (!globalObject)
return;
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/bindings/js/JSEventListener.h (216364 => 216365)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/bindings/js/JSEventListener.h 2017-05-08 08:47:36 UTC (rev 216364)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/bindings/js/JSEventListener.h 2017-05-08 08:51:21 UTC (rev 216365)
@@ -55,7 +55,7 @@
{
return listener->type() == JSEventListenerType
? static_cast<const JSEventListener*>(listener)
- : 0;
+ : nullptr;
}
virtual ~JSEventListener();
@@ -66,7 +66,7 @@
bool isAttribute() const { return m_isAttribute; }
JSC::JSObject* jsFunction(ScriptExecutionContext*) const;
- DOMWrapperWorld& isolatedWorld() const { return *m_isolatedWorld; }
+ DOMWrapperWorld& isolatedWorld() const { return m_isolatedWorld; }
JSC::JSObject* wrapper() const { return m_wrapper.get(); }
void setWrapper(JSC::VM&, JSC::JSObject* wrapper) const { m_wrapper = JSC::Weak<JSC::JSObject>(wrapper); }
@@ -88,7 +88,7 @@
mutable JSC::Weak<JSC::JSObject> m_wrapper;
bool m_isAttribute;
- RefPtr<DOMWrapperWorld> m_isolatedWorld;
+ Ref<DOMWrapperWorld> m_isolatedWorld;
};
// For "onxxx" attributes that automatically set up _javascript_ event listeners.
@@ -129,7 +129,7 @@
// If m_wrapper is 0, then m_jsFunction is zombied, and should never be accessed.
if (!m_wrapper)
- return 0;
+ return nullptr;
// Try to verify that m_jsFunction wasn't recycled. (Not exact, since an
// event listener can be almost anything, but this makes test-writing easier).
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes