Title: [135502] trunk/Source/WebCore
Revision
135502
Author
[email protected]
Date
2012-11-22 03:31:24 -0800 (Thu, 22 Nov 2012)

Log Message

[V8] Rename toWebCoreStringWithNullOrUndefinedCheck() with toWebCoreStringWithUndefinedOrNullCheck()
https://bugs.webkit.org/show_bug.cgi?id=103013

Reviewed by Adam Barth.

IDL attributes and other V8 and JSC files use "UndefinedOrNull" instead of "NullOrUndefined".

No tests. No change in behavior.

* bindings/v8/_javascript_CallFrame.cpp:
(WebCore::_javascript_CallFrame::functionName):
* bindings/v8/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::setScriptSource):
(WebCore::ScriptDebugServer::dispatchDidParseSource):
(WebCore::ScriptDebugServer::compileScript):
(WebCore::ScriptDebugServer::runScript):
* bindings/v8/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerLocation):
* bindings/v8/V8Binding.h:
(WebCore::toWebCoreStringWithUndefinedOrNullCheck):
* bindings/v8/custom/V8DOMWindowCustom.cpp:
(WebCore::V8DOMWindow::showModalDialogCallback):
(WebCore::V8DOMWindow::openCallback):
* bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
(WebCore::V8JavaScriptCallFrame::evaluateCallback):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (135501 => 135502)


--- trunk/Source/WebCore/ChangeLog	2012-11-22 11:12:40 UTC (rev 135501)
+++ trunk/Source/WebCore/ChangeLog	2012-11-22 11:31:24 UTC (rev 135502)
@@ -1,3 +1,31 @@
+2012-11-22  Kentaro Hara  <[email protected]>
+
+        [V8] Rename toWebCoreStringWithNullOrUndefinedCheck() with toWebCoreStringWithUndefinedOrNullCheck()
+        https://bugs.webkit.org/show_bug.cgi?id=103013
+
+        Reviewed by Adam Barth.
+
+        IDL attributes and other V8 and JSC files use "UndefinedOrNull" instead of "NullOrUndefined".
+
+        No tests. No change in behavior.
+
+        * bindings/v8/_javascript_CallFrame.cpp:
+        (WebCore::_javascript_CallFrame::functionName):
+        * bindings/v8/ScriptDebugServer.cpp:
+        (WebCore::ScriptDebugServer::setScriptSource):
+        (WebCore::ScriptDebugServer::dispatchDidParseSource):
+        (WebCore::ScriptDebugServer::compileScript):
+        (WebCore::ScriptDebugServer::runScript):
+        * bindings/v8/ScriptEventListener.cpp:
+        (WebCore::eventListenerHandlerLocation):
+        * bindings/v8/V8Binding.h:
+        (WebCore::toWebCoreStringWithUndefinedOrNullCheck):
+        * bindings/v8/custom/V8DOMWindowCustom.cpp:
+        (WebCore::V8DOMWindow::showModalDialogCallback):
+        (WebCore::V8DOMWindow::openCallback):
+        * bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp:
+        (WebCore::V8JavaScriptCallFrame::evaluateCallback):
+
 2012-11-22  Harald Alvestrand  <[email protected]>
 
         Name enumerator function for GetStats RTCStatsElement

Modified: trunk/Source/WebCore/bindings/v8/_javascript_CallFrame.cpp (135501 => 135502)


--- trunk/Source/WebCore/bindings/v8/_javascript_CallFrame.cpp	2012-11-22 11:12:40 UTC (rev 135501)
+++ trunk/Source/WebCore/bindings/v8/_javascript_CallFrame.cpp	2012-11-22 11:31:24 UTC (rev 135502)
@@ -95,7 +95,7 @@
     v8::HandleScope handleScope;
     v8::Context::Scope contextScope(m_debuggerContext.get());
     v8::Handle<v8::Value> result = m_callFrame.get()->Get(v8String("functionName"));
-    return toWebCoreStringWithNullOrUndefinedCheck(result);
+    return toWebCoreStringWithUndefinedOrNullCheck(result);
 }
 
 v8::Handle<v8::Value> _javascript_CallFrame::scopeChain() const

Modified: trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp (135501 => 135502)


--- trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp	2012-11-22 11:12:40 UTC (rev 135501)
+++ trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp	2012-11-22 11:31:24 UTC (rev 135502)
@@ -239,7 +239,7 @@
     if (tryCatch.HasCaught()) {
         v8::Local<v8::Message> message = tryCatch.Message();
         if (!message.IsEmpty())
-            *error = toWebCoreStringWithNullOrUndefinedCheck(message->Get());
+            *error = toWebCoreStringWithUndefinedOrNullCheck(message->Get());
         else
             *error = "Unknown error.";
         return false;
@@ -377,12 +377,12 @@
 
 void ScriptDebugServer::dispatchDidParseSource(ScriptDebugListener* listener, v8::Handle<v8::Object> object)
 {
-    String sourceID = toWebCoreStringWithNullOrUndefinedCheck(object->Get(v8::String::New("id")));
+    String sourceID = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::New("id")));
 
     ScriptDebugListener::Script script;
-    script.url = ""
-    script.source = toWebCoreStringWithNullOrUndefinedCheck(object->Get(v8::String::New("source")));
-    script.sourceMappingURL = toWebCoreStringWithNullOrUndefinedCheck(object->Get(v8::String::New("sourceMappingURL")));
+    script.url = ""
+    script.source = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::New("source")));
+    script.sourceMappingURL = toWebCoreStringWithUndefinedOrNullCheck(object->Get(v8::String::New("sourceMappingURL")));
     script.startLine = object->Get(v8::String::New("startLine"))->ToInteger()->Value();
     script.startColumn = object->Get(v8::String::New("startColumn"))->ToInteger()->Value();
     script.endLine = object->Get(v8::String::New("endLine"))->ToInteger()->Value();
@@ -444,13 +444,13 @@
     if (tryCatch.HasCaught()) {
         v8::Local<v8::Message> message = tryCatch.Message();
         if (!message.IsEmpty())
-            *exceptionMessage = toWebCoreStringWithNullOrUndefinedCheck(message->Get());
+            *exceptionMessage = toWebCoreStringWithUndefinedOrNullCheck(message->Get());
         return;
     }
     if (script.IsEmpty())
         return;
 
-    *scriptId = toWebCoreStringWithNullOrUndefinedCheck(script->Id());
+    *scriptId = toWebCoreStringWithUndefinedOrNullCheck(script->Id());
     m_compiledScripts.set(*scriptId, adoptPtr(new ScopedPersistent<v8::Script>(script)));
 }
 
@@ -488,7 +488,7 @@
         *result = ScriptValue(tryCatch.Exception());
         v8::Local<v8::Message> message = tryCatch.Message();
         if (!message.IsEmpty())
-            *exceptionMessage = toWebCoreStringWithNullOrUndefinedCheck(message->Get());
+            *exceptionMessage = toWebCoreStringWithUndefinedOrNullCheck(message->Get());
     } else
         *result = ScriptValue(value);
 }

Modified: trunk/Source/WebCore/bindings/v8/ScriptEventListener.cpp (135501 => 135502)


--- trunk/Source/WebCore/bindings/v8/ScriptEventListener.cpp	2012-11-22 11:12:40 UTC (rev 135501)
+++ trunk/Source/WebCore/bindings/v8/ScriptEventListener.cpp	2012-11-22 11:31:24 UTC (rev 135502)
@@ -118,7 +118,7 @@
 
     v8::Handle<v8::Function> function = v8::Handle<v8::Function>::Cast(object);
     v8::Handle<v8::Value> scriptIdValue = function->GetScriptId();
-    scriptId = toWebCoreStringWithNullOrUndefinedCheck(scriptIdValue);
+    scriptId = toWebCoreStringWithUndefinedOrNullCheck(scriptIdValue);
     v8::ScriptOrigin origin = function->GetScriptOrigin();
     if (origin.ResourceName()->IsString() && !origin.ResourceName().IsEmpty())
         sourceName = toWebCoreString(origin.ResourceName());

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (135501 => 135502)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-11-22 11:12:40 UTC (rev 135501)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2012-11-22 11:31:24 UTC (rev 135502)
@@ -333,7 +333,7 @@
         return value->IsNull() ? String() : toWebCoreString(value);
     }
 
-    inline String toWebCoreStringWithNullOrUndefinedCheck(v8::Handle<v8::Value> value)
+    inline String toWebCoreStringWithUndefinedOrNullCheck(v8::Handle<v8::Value> value)
     {
         return (value->IsNull() || value->IsUndefined()) ? String() : toWebCoreString(value);
     }

Modified: trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp (135501 => 135502)


--- trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp	2012-11-22 11:12:40 UTC (rev 135501)
+++ trunk/Source/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp	2012-11-22 11:31:24 UTC (rev 135502)
@@ -431,9 +431,9 @@
         return v8::Undefined();
 
     // FIXME: Handle exceptions properly.
-    String urlString = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
+    String urlString = toWebCoreStringWithUndefinedOrNullCheck(args[0]);
     DialogHandler handler(args[1]);
-    String dialogFeaturesString = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
+    String dialogFeaturesString = toWebCoreStringWithUndefinedOrNullCheck(args[2]);
 
     impl->showModalDialog(urlString, dialogFeaturesString, activeDOMWindow(state), firstDOMWindow(state), setUpDialog, &handler);
 
@@ -449,9 +449,9 @@
         return v8::Undefined();
 
     // FIXME: Handle exceptions properly.
-    String urlString = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
+    String urlString = toWebCoreStringWithUndefinedOrNullCheck(args[0]);
     AtomicString frameName = (args[1]->IsUndefined() || args[1]->IsNull()) ? "_blank" : AtomicString(toWebCoreString(args[1]));
-    String windowFeaturesString = toWebCoreStringWithNullOrUndefinedCheck(args[2]);
+    String windowFeaturesString = toWebCoreStringWithUndefinedOrNullCheck(args[2]);
 
     RefPtr<DOMWindow> openedWindow = impl->open(urlString, frameName, windowFeaturesString, activeDOMWindow(state), firstDOMWindow(state));
     if (!openedWindow)

Modified: trunk/Source/WebCore/bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp (135501 => 135502)


--- trunk/Source/WebCore/bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp	2012-11-22 11:12:40 UTC (rev 135501)
+++ trunk/Source/WebCore/bindings/v8/custom/V8JavaScriptCallFrameCustom.cpp	2012-11-22 11:31:24 UTC (rev 135502)
@@ -41,7 +41,7 @@
 {
     INC_STATS("V8JavaScriptCallFrame.evaluateCallback()");
     _javascript_CallFrame* impl = V8JavaScriptCallFrame::toNative(args.Holder());
-    String _expression_ = toWebCoreStringWithNullOrUndefinedCheck(args[0]);
+    String _expression_ = toWebCoreStringWithUndefinedOrNullCheck(args[0]);
     return impl->evaluate(_expression_);
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to