Title: [124542] trunk/Source
Revision
124542
Author
[email protected]
Date
2012-08-02 17:45:28 -0700 (Thu, 02 Aug 2012)

Log Message

V8Proxy::currentContext() doesn't do anything and should be removed
https://bugs.webkit.org/show_bug.cgi?id=93041

Reviewed by Eric Seidel.

Source/WebCore:

It's just a wrapper for GetCurrent().

* bindings/v8/DateExtension.cpp:
(WebCore::DateExtension::setAllowSleep):
* bindings/v8/V8NPUtils.cpp:
(WebCore::convertV8ObjectToNPVariant):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::retrieve):
(WebCore::V8Proxy::mainWorldContext):
* bindings/v8/V8Proxy.h:
(V8Proxy):
* bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
(WebCore::getJSListenerFunctions):

Source/WebKit/chromium:

* src/WebBindings.cpp:
(WebKit::makeIntArrayImpl):
(WebKit::makeStringArrayImpl):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (124541 => 124542)


--- trunk/Source/WebCore/ChangeLog	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebCore/ChangeLog	2012-08-03 00:45:28 UTC (rev 124542)
@@ -1,3 +1,24 @@
+2012-08-02  Adam Barth  <[email protected]>
+
+        V8Proxy::currentContext() doesn't do anything and should be removed
+        https://bugs.webkit.org/show_bug.cgi?id=93041
+
+        Reviewed by Eric Seidel.
+
+        It's just a wrapper for GetCurrent().
+
+        * bindings/v8/DateExtension.cpp:
+        (WebCore::DateExtension::setAllowSleep):
+        * bindings/v8/V8NPUtils.cpp:
+        (WebCore::convertV8ObjectToNPVariant):
+        * bindings/v8/V8Proxy.cpp:
+        (WebCore::V8Proxy::retrieve):
+        (WebCore::V8Proxy::mainWorldContext):
+        * bindings/v8/V8Proxy.h:
+        (V8Proxy):
+        * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
+        (WebCore::getJSListenerFunctions):
+
 2012-08-02  David Grogan  <[email protected]>
 
         IndexedDB: Core upgradeneeded logic

Modified: trunk/Source/WebCore/bindings/v8/DateExtension.cpp (124541 => 124542)


--- trunk/Source/WebCore/bindings/v8/DateExtension.cpp	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebCore/bindings/v8/DateExtension.cpp	2012-08-03 00:45:28 UTC (rev 124542)
@@ -76,7 +76,7 @@
 
 void DateExtension::setAllowSleep(bool allow)
 {
-    v8::Local<v8::Value> result = V8Proxy::currentContext()->Global()->Get(v8::String::New("Date"));
+    v8::Local<v8::Value> result = v8::Context::GetCurrent()->Global()->Get(v8::String::New("Date"));
     if (result.IsEmpty() || !result->IsObject())
         return;
 

Modified: trunk/Source/WebCore/bindings/v8/V8NPUtils.cpp (124541 => 124542)


--- trunk/Source/WebCore/bindings/v8/V8NPUtils.cpp	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebCore/bindings/v8/V8NPUtils.cpp	2012-08-03 00:45:28 UTC (rev 124542)
@@ -69,7 +69,7 @@
         str->WriteUtf8(utf8Chars, length, 0, v8::String::HINT_MANY_WRITES_EXPECTED);
         STRINGN_TO_NPVARIANT(utf8Chars, length-1, *result);
     } else if (object->IsObject()) {
-        DOMWindow* window = V8Proxy::retrieveWindow(V8Proxy::currentContext());
+        DOMWindow* window = V8Proxy::retrieveWindow(v8::Context::GetCurrent());
         NPObject* npobject = npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(object), window);
         if (npobject)
             _NPN_RegisterObject(npobject, owner);

Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.cpp (124541 => 124542)


--- trunk/Source/WebCore/bindings/v8/V8Proxy.cpp	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.cpp	2012-08-03 00:45:28 UTC (rev 124542)
@@ -524,7 +524,7 @@
 
 V8Proxy* V8Proxy::retrieve()
 {
-    DOMWindow* window = retrieveWindow(currentContext());
+    DOMWindow* window = retrieveWindow(v8::Context::GetCurrent());
     ASSERT(window);
     return retrieve(window->frame());
 }
@@ -724,11 +724,6 @@
     return proxy->mainWorldContext();
 }
 
-v8::Local<v8::Context> V8Proxy::currentContext()
-{
-    return v8::Context::GetCurrent();
-}
-
 v8::Handle<v8::Value> V8Proxy::checkNewLegal(const v8::Arguments& args)
 {
     if (ConstructorMode::current() == ConstructorMode::CreateNewObject)

Modified: trunk/Source/WebCore/bindings/v8/V8Proxy.h (124541 => 124542)


--- trunk/Source/WebCore/bindings/v8/V8Proxy.h	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebCore/bindings/v8/V8Proxy.h	2012-08-03 00:45:28 UTC (rev 124542)
@@ -222,7 +222,6 @@
         // a new context. It is potentially slow and consumes memory.
         static v8::Local<v8::Context> context(Frame*);
         static v8::Local<v8::Context> mainWorldContext(Frame*);
-        static v8::Local<v8::Context> currentContext();
 
         // If the current context causes out of memory, _javascript_ setting
         // is disabled and it returns true.

Modified: trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp (124541 => 124542)


--- trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp	2012-08-03 00:45:28 UTC (rev 124542)
@@ -205,7 +205,7 @@
         V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener.get());
         v8::Local<v8::Context> context = toV8Context(document, v8Listener->worldContext());
         // Hide listeners from other contexts.
-        if (context != V8Proxy::currentContext())
+        if (context != v8::Context::GetCurrent())
             continue;
         v8::Local<v8::Object> function = v8Listener->getListenerObject(document);
         v8::Local<v8::Object> listenerEntry = v8::Object::New();

Modified: trunk/Source/WebKit/chromium/ChangeLog (124541 => 124542)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-08-03 00:45:28 UTC (rev 124542)
@@ -1,3 +1,14 @@
+2012-08-02  Adam Barth  <[email protected]>
+
+        V8Proxy::currentContext() doesn't do anything and should be removed
+        https://bugs.webkit.org/show_bug.cgi?id=93041
+
+        Reviewed by Eric Seidel.
+
+        * src/WebBindings.cpp:
+        (WebKit::makeIntArrayImpl):
+        (WebKit::makeStringArrayImpl):
+
 2012-08-02  David Grogan  <[email protected]>
 
         IndexedDB: Core upgradeneeded logic

Modified: trunk/Source/WebKit/chromium/src/WebBindings.cpp (124541 => 124542)


--- trunk/Source/WebKit/chromium/src/WebBindings.cpp	2012-08-03 00:40:57 UTC (rev 124541)
+++ trunk/Source/WebKit/chromium/src/WebBindings.cpp	2012-08-03 00:45:28 UTC (rev 124542)
@@ -289,7 +289,7 @@
     for (size_t i = 0; i < data.size(); ++i)
         result->Set(i, v8::Number::New(data[i]));
 
-    DOMWindow* window = V8Proxy::retrieveWindow(V8Proxy::currentContext());
+    DOMWindow* window = V8Proxy::retrieveWindow(v8::Context::GetCurrent());
     return npCreateV8ScriptObject(0, result, window);
 }
 
@@ -300,7 +300,7 @@
     for (size_t i = 0; i < data.size(); ++i)
         result->Set(i, data[i].data() ? v8::String::New(reinterpret_cast<const uint16_t*>((data[i].data())), data[i].length()) : v8::String::New(""));
 
-    DOMWindow* window = V8Proxy::retrieveWindow(V8Proxy::currentContext());
+    DOMWindow* window = V8Proxy::retrieveWindow(v8::Context::GetCurrent());
     return npCreateV8ScriptObject(0, result, window);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to