Title: [125479] trunk/Source/WebCore
Revision
125479
Author
[email protected]
Date
2012-08-13 17:44:32 -0700 (Mon, 13 Aug 2012)

Log Message

[V8] Remove V8BindingHelpers
https://bugs.webkit.org/show_bug.cgi?id=93807

Reviewed by Adam Barth.

V8BindingHelpers contains toV8Context() and toV8Proxy(), which are used
by NPV8Object.cpp only.

(1) Move these methods to NPV8Object.cpp as static methods.
(2) Remove V8BindingHelpers.{h,cpp}.

No tests. No change in behavior.

* UseV8.cmake:
* WebCore.gypi:
* bindings/v8/NPV8Object.cpp:
(WebCore::toV8Context):
(WebCore):
(WebCore::toV8Proxy):
* bindings/v8/V8Binding.h:
* bindings/v8/V8BindingHelpers.cpp: Removed.
* bindings/v8/V8BindingHelpers.h: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (125478 => 125479)


--- trunk/Source/WebCore/ChangeLog	2012-08-14 00:42:36 UTC (rev 125478)
+++ trunk/Source/WebCore/ChangeLog	2012-08-14 00:44:32 UTC (rev 125479)
@@ -1,5 +1,30 @@
 2012-08-13  Kentaro Hara  <[email protected]>
 
+        [V8] Remove V8BindingHelpers
+        https://bugs.webkit.org/show_bug.cgi?id=93807
+
+        Reviewed by Adam Barth.
+
+        V8BindingHelpers contains toV8Context() and toV8Proxy(), which are used
+        by NPV8Object.cpp only.
+
+        (1) Move these methods to NPV8Object.cpp as static methods.
+        (2) Remove V8BindingHelpers.{h,cpp}.
+
+        No tests. No change in behavior.
+
+        * UseV8.cmake:
+        * WebCore.gypi:
+        * bindings/v8/NPV8Object.cpp:
+        (WebCore::toV8Context):
+        (WebCore):
+        (WebCore::toV8Proxy):
+        * bindings/v8/V8Binding.h:
+        * bindings/v8/V8BindingHelpers.cpp: Removed.
+        * bindings/v8/V8BindingHelpers.h: Removed.
+
+2012-08-13  Kentaro Hara  <[email protected]>
+
         [V8] Remove unused methods and headers from V8Utilities
         https://bugs.webkit.org/show_bug.cgi?id=93805
 

Modified: trunk/Source/WebCore/UseV8.cmake (125478 => 125479)


--- trunk/Source/WebCore/UseV8.cmake	2012-08-14 00:42:36 UTC (rev 125478)
+++ trunk/Source/WebCore/UseV8.cmake	2012-08-14 00:44:32 UTC (rev 125479)
@@ -46,7 +46,6 @@
     bindings/v8/StaticDOMDataStore.cpp
     bindings/v8/V8AbstractEventListener.cpp
     bindings/v8/V8Binding.cpp
-    bindings/v8/V8BindingHelpers.cpp
     bindings/v8/V8Collection.cpp
     bindings/v8/V8DOMConfiguration.cpp,
     bindings/v8/V8DOMMap.cpp

Modified: trunk/Source/WebCore/WebCore.gypi (125478 => 125479)


--- trunk/Source/WebCore/WebCore.gypi	2012-08-14 00:42:36 UTC (rev 125478)
+++ trunk/Source/WebCore/WebCore.gypi	2012-08-14 00:44:32 UTC (rev 125479)
@@ -2239,8 +2239,6 @@
             'bindings/v8/V8AbstractEventListener.h',
             'bindings/v8/V8Binding.cpp',
             'bindings/v8/V8Binding.h',
-            'bindings/v8/V8BindingHelpers.cpp',
-            'bindings/v8/V8BindingHelpers.h',
             'bindings/v8/V8BindingMacros.h',
             'bindings/v8/V8Collection.cpp',
             'bindings/v8/V8Collection.h',

Modified: trunk/Source/WebCore/bindings/v8/NPV8Object.cpp (125478 => 125479)


--- trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2012-08-14 00:42:36 UTC (rev 125478)
+++ trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2012-08-14 00:44:32 UTC (rev 125479)
@@ -60,6 +60,24 @@
 typedef Vector<V8NPObject*> V8NPObjectVector;
 typedef HashMap<int, V8NPObjectVector> V8NPObjectMap;
 
+static v8::Local<v8::Context> toV8Context(NPP npp, NPObject* npObject)
+{
+    V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject);
+    DOMWindow* domWindow = object->rootObject;
+    if (!domWindow || !domWindow->frame() || domWindow != domWindow->frame()->domWindow())
+        return v8::Local<v8::Context>();
+    return V8Proxy::mainWorldContext(object->rootObject->frame());
+}
+
+static V8Proxy* toV8Proxy(NPObject* npObject)
+{
+    V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject);
+    Frame* frame = object->rootObject->frame();
+    if (!frame)
+        return 0;
+    return frame->script()->proxy();
+}
+
 static V8NPObjectMap* staticV8NPObjectMap()
 {
     DEFINE_STATIC_LOCAL(V8NPObjectMap, v8npObjectMap, ());

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (125478 => 125479)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-08-14 00:42:36 UTC (rev 125478)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-08-14 00:44:32 UTC (rev 125479)
@@ -35,7 +35,6 @@
 #include "DOMDataStore.h"
 #include "Document.h"
 #include "PlatformString.h"
-#include "V8BindingHelpers.h"
 #include "V8BindingMacros.h"
 #include "V8DOMConfiguration.h"
 #include "V8DOMWrapper.h"

Deleted: trunk/Source/WebCore/bindings/v8/V8BindingHelpers.cpp (125478 => 125479)


--- trunk/Source/WebCore/bindings/v8/V8BindingHelpers.cpp	2012-08-14 00:42:36 UTC (rev 125478)
+++ trunk/Source/WebCore/bindings/v8/V8BindingHelpers.cpp	2012-08-14 00:44:32 UTC (rev 125479)
@@ -1,59 +0,0 @@
-/*
-* Copyright (C) 2008, 2009 Google Inc. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-*     * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*     * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following disclaimer
-* in the documentation and/or other materials provided with the
-* distribution.
-*     * Neither the name of Google Inc. nor the names of its
-* contributors may be used to endorse or promote products derived from
-* this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "config.h"
-#include "V8BindingHelpers.h"
-
-#include "DOMWindow.h"
-#include "Frame.h"
-#include "NPV8Object.h"
-#include "V8Proxy.h"
-
-namespace WebCore {
-
-v8::Local<v8::Context> toV8Context(NPP npp, NPObject* npObject)
-{
-    V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject);
-    DOMWindow* domWindow = object->rootObject;
-    if (!domWindow || !domWindow->frame() || domWindow != domWindow->frame()->domWindow())
-        return v8::Local<v8::Context>();
-    return V8Proxy::mainWorldContext(object->rootObject->frame());
-}
-
-V8Proxy* toV8Proxy(NPObject* npObject)
-{
-    V8NPObject* object = reinterpret_cast<V8NPObject*>(npObject);
-    Frame* frame = object->rootObject->frame();
-    if (!frame)
-        return 0;
-    return frame->script()->proxy();
-}
-
-} // namespace WebCore

Deleted: trunk/Source/WebCore/bindings/v8/V8BindingHelpers.h (125478 => 125479)


--- trunk/Source/WebCore/bindings/v8/V8BindingHelpers.h	2012-08-14 00:42:36 UTC (rev 125478)
+++ trunk/Source/WebCore/bindings/v8/V8BindingHelpers.h	2012-08-14 00:44:32 UTC (rev 125479)
@@ -1,47 +0,0 @@
-/*
-* Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-*
-*     * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-*     * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following disclaimer
-* in the documentation and/or other materials provided with the
-* distribution.
-*     * Neither the name of Google Inc. nor the names of its
-* contributors may be used to endorse or promote products derived from
-* this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef V8BindingHelpers_h
-#define V8BindingHelpers_h
-
-#include "npruntime_internal.h"
-#include <v8.h>
-
-namespace WebCore {
-
-class V8Proxy;
-
-v8::Local<v8::Context> toV8Context(NPP, NPObject*);
-
-V8Proxy* toV8Proxy(NPObject*);
-
-} // namespace WebCore
-
-#endif // V8BindingHelpers_h
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to