Diff
Modified: trunk/Source/WebCore/ChangeLog (125019 => 125020)
--- trunk/Source/WebCore/ChangeLog 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/ChangeLog 2012-08-08 11:44:52 UTC (rev 125020)
@@ -1,5 +1,32 @@
2012-08-08 Kentaro Hara <[email protected]>
+ [V8] Rename V8Helpers to V8BindingHelpers
+ https://bugs.webkit.org/show_bug.cgi?id=93318
+
+ Reviewed by Eric Seidel.
+
+ For naming consistency, a file including binding utility methods
+ should be prefixed by "V8Binding". In a follow-up patch, I'll move
+ methods from V8Binding to V8BindingHelpers.
+
+ In addition this patch makes V8Binding.h include V8BindingHelpers.h,
+ and removes #include V8BindingHelpers.h from binding files.
+
+ No tests. No change in behavior.
+
+ * UseV8.cmake:
+ * WebCore.gypi:
+ * bindings/v8/NPV8Object.cpp:
+ * bindings/v8/V8BindingHelpers.cpp: Renamed from Source/WebCore/bindings/v8/V8Helpers.cpp.
+ (WebCore):
+ (WebCore::toV8Context):
+ (WebCore::toV8Proxy):
+ * bindings/v8/V8BindingHelpers.h: Renamed from Source/WebCore/bindings/v8/V8Helpers.h.
+ (WebCore):
+ * bindings/v8/V8NPObject.cpp:
+
+2012-08-08 Kentaro Hara <[email protected]>
+
'class WrapperTypeInfo' should be 'struct WrapperTypeInfo'
Unreviewed. Build fix for r125015.
Modified: trunk/Source/WebCore/UseV8.cmake (125019 => 125020)
--- trunk/Source/WebCore/UseV8.cmake 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/UseV8.cmake 2012-08-08 11:44:52 UTC (rev 125020)
@@ -46,6 +46,7 @@
bindings/v8/StaticDOMDataStore.cpp
bindings/v8/V8AbstractEventListener.cpp
bindings/v8/V8Binding.cpp
+ bindings/v8/V8BindingHelpers.cpp
bindings/v8/V8BindingPerIsolateData.cpp
bindings/v8/V8ConfigureDOMAttributesAndMethods.cpp,
bindings/v8/V8Collection.cpp
@@ -56,7 +57,6 @@
bindings/v8/V8EventListenerList.cpp
bindings/v8/V8GCController.cpp
bindings/v8/V8GCForContextDispose.cpp
- bindings/v8/V8Helpers.cpp
bindings/v8/V8HiddenPropertyName.cpp
bindings/v8/V8IsolatedContext.cpp
bindings/v8/V8LazyEventListener.cpp
Modified: trunk/Source/WebCore/WebCore.gypi (125019 => 125020)
--- trunk/Source/WebCore/WebCore.gypi 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/WebCore.gypi 2012-08-08 11:44:52 UTC (rev 125020)
@@ -2249,6 +2249,8 @@
'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/V8BindingPerContextData.cpp',
'bindings/v8/V8BindingPerContextData.h',
@@ -2272,8 +2274,6 @@
'bindings/v8/V8GCController.h',
'bindings/v8/V8GCForContextDispose.cpp',
'bindings/v8/V8GCForContextDispose.h',
- 'bindings/v8/V8Helpers.cpp',
- 'bindings/v8/V8Helpers.h',
'bindings/v8/V8HiddenPropertyName.cpp',
'bindings/v8/V8HiddenPropertyName.h',
'bindings/v8/V8IsolatedContext.cpp',
Modified: trunk/Source/WebCore/bindings/v8/NPV8Object.cpp (125019 => 125020)
--- trunk/Source/WebCore/bindings/v8/NPV8Object.cpp 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/bindings/v8/NPV8Object.cpp 2012-08-08 11:44:52 UTC (rev 125020)
@@ -38,7 +38,6 @@
#include "UserGestureIndicator.h"
#include "V8Binding.h"
#include "V8GCController.h"
-#include "V8Helpers.h"
#include "V8NPUtils.h"
#include "V8Proxy.h"
#include "WrapperTypeInfo.h"
Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (125019 => 125020)
--- trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h 2012-08-08 11:44:52 UTC (rev 125020)
@@ -35,6 +35,7 @@
#include "DOMDataStore.h"
#include "Document.h"
#include "PlatformString.h"
+#include "V8BindingHelpers.h"
#include "V8BindingMacros.h"
#include "V8BindingPerIsolateData.h"
#include "V8ConfigureDOMAttributesAndMethods.h"
Copied: trunk/Source/WebCore/bindings/v8/V8BindingHelpers.cpp (from rev 125019, trunk/Source/WebCore/bindings/v8/V8Helpers.cpp) (0 => 125020)
--- trunk/Source/WebCore/bindings/v8/V8BindingHelpers.cpp (rev 0)
+++ trunk/Source/WebCore/bindings/v8/V8BindingHelpers.cpp 2012-08-08 11:44:52 UTC (rev 125020)
@@ -0,0 +1,59 @@
+/*
+* 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
Copied: trunk/Source/WebCore/bindings/v8/V8BindingHelpers.h (from rev 125019, trunk/Source/WebCore/bindings/v8/V8Helpers.h) (0 => 125020)
--- trunk/Source/WebCore/bindings/v8/V8BindingHelpers.h (rev 0)
+++ trunk/Source/WebCore/bindings/v8/V8BindingHelpers.h 2012-08-08 11:44:52 UTC (rev 125020)
@@ -0,0 +1,47 @@
+/*
+* 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
Deleted: trunk/Source/WebCore/bindings/v8/V8Helpers.cpp (125019 => 125020)
--- trunk/Source/WebCore/bindings/v8/V8Helpers.cpp 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/bindings/v8/V8Helpers.cpp 2012-08-08 11:44:52 UTC (rev 125020)
@@ -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 "V8Helpers.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/V8Helpers.h (125019 => 125020)
--- trunk/Source/WebCore/bindings/v8/V8Helpers.h 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/bindings/v8/V8Helpers.h 2012-08-08 11:44:52 UTC (rev 125020)
@@ -1,46 +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 V8Helpers_h
-#define V8Helpers_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 // V8Helpers_h
Modified: trunk/Source/WebCore/bindings/v8/V8NPObject.cpp (125019 => 125020)
--- trunk/Source/WebCore/bindings/v8/V8NPObject.cpp 2012-08-08 11:20:40 UTC (rev 125019)
+++ trunk/Source/WebCore/bindings/v8/V8NPObject.cpp 2012-08-08 11:44:52 UTC (rev 125020)
@@ -40,7 +40,6 @@
#include "V8HTMLAppletElement.h"
#include "V8HTMLEmbedElement.h"
#include "V8HTMLObjectElement.h"
-#include "V8Helpers.h"
#include "V8NPUtils.h"
#include "V8Proxy.h"
#include "npruntime_impl.h"