Title: [91900] trunk/Source/WebCore
Revision
91900
Author
[email protected]
Date
2011-07-27 21:32:39 -0700 (Wed, 27 Jul 2011)

Log Message

[V8] Remove unused m_isWeak member of V8AbstractEventListener
https://bugs.webkit.org/show_bug.cgi?id=65273

Reviewed by Adam Barth.

m_isWeak is set to true in the constructor and never changed,
so the one if statement that tests it always executes; the
code has been updated to make this clear.

No behavior change, thus no tests.

* bindings/v8/V8AbstractEventListener.cpp:
(WebCore::V8AbstractEventListener::V8AbstractEventListener):
(WebCore::V8AbstractEventListener::setListenerObject):
* bindings/v8/V8AbstractEventListener.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (91899 => 91900)


--- trunk/Source/WebCore/ChangeLog	2011-07-28 04:23:06 UTC (rev 91899)
+++ trunk/Source/WebCore/ChangeLog	2011-07-28 04:32:39 UTC (rev 91900)
@@ -1,3 +1,21 @@
+2011-07-27  Adam Klein  <[email protected]>
+
+        [V8] Remove unused m_isWeak member of V8AbstractEventListener
+        https://bugs.webkit.org/show_bug.cgi?id=65273
+
+        Reviewed by Adam Barth.
+
+        m_isWeak is set to true in the constructor and never changed,
+        so the one if statement that tests it always executes; the
+        code has been updated to make this clear.
+
+        No behavior change, thus no tests.
+
+        * bindings/v8/V8AbstractEventListener.cpp:
+        (WebCore::V8AbstractEventListener::V8AbstractEventListener):
+        (WebCore::V8AbstractEventListener::setListenerObject):
+        * bindings/v8/V8AbstractEventListener.h:
+
 2011-07-27  Fady Samuel  <[email protected]>
 
         Popups on Chromium now check the minimum row height set through the Chromium WebKit API when

Modified: trunk/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp (91899 => 91900)


--- trunk/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp	2011-07-28 04:23:06 UTC (rev 91899)
+++ trunk/Source/WebCore/bindings/v8/V8AbstractEventListener.cpp	2011-07-28 04:32:39 UTC (rev 91900)
@@ -54,7 +54,6 @@
 
 V8AbstractEventListener::V8AbstractEventListener(bool isAttribute, const WorldContextHandle& worldContext)
     : EventListener(JSEventListenerType)
-    , m_isWeak(true)
     , m_isAttribute(isAttribute)
     , m_worldContext(worldContext)
 {
@@ -116,8 +115,7 @@
 #ifndef NDEBUG
     V8GCController::registerGlobalHandle(EVENT_LISTENER, this, m_listener);
 #endif
-    if (m_isWeak)
-        m_listener.MakeWeak(this, &weakEventListenerCallback);
+    m_listener.MakeWeak(this, &weakEventListenerCallback);
 }
 
 void V8AbstractEventListener::invokeEventHandler(ScriptExecutionContext* context, Event* event, v8::Handle<v8::Value> jsEvent)

Modified: trunk/Source/WebCore/bindings/v8/V8AbstractEventListener.h (91899 => 91900)


--- trunk/Source/WebCore/bindings/v8/V8AbstractEventListener.h	2011-07-28 04:23:06 UTC (rev 91899)
+++ trunk/Source/WebCore/bindings/v8/V8AbstractEventListener.h	2011-07-28 04:32:39 UTC (rev 91900)
@@ -89,8 +89,7 @@
         }
 
         // Provides access to the underlying handle for GC. Returned
-        // value might be a weak handle and so not guaranteed to stay
-        // alive.
+        // value is a weak handle and so not guaranteed to stay alive.
         v8::Persistent<v8::Object> existingListenerObjectPersistentHandle()
         {
             return m_listener;
@@ -126,9 +125,6 @@
 
         v8::Persistent<v8::Object> m_listener;
 
-        // Indicates if the above handle is weak.
-        bool m_isWeak;
-
         // Indicates if this is an HTML type listener.
         bool m_isAttribute;
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to