Title: [140516] trunk/Source/WebCore
Revision
140516
Author
[email protected]
Date
2013-01-23 00:28:13 -0800 (Wed, 23 Jan 2013)

Log Message

[V8] Make an Isolate parameter mandatory in throwError()
https://bugs.webkit.org/show_bug.cgi?id=107636

Reviewed by Adam Barth.

No tests. No change in behavior.

* bindings/v8/NPV8Object.cpp:
(_NPN_SetException):
* bindings/v8/V8Binding.cpp:
(WebCore::handleMaxRecursionDepthExceeded):
* bindings/v8/V8Binding.h:
(WebCore):
* bindings/v8/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::setException):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (140515 => 140516)


--- trunk/Source/WebCore/ChangeLog	2013-01-23 08:00:07 UTC (rev 140515)
+++ trunk/Source/WebCore/ChangeLog	2013-01-23 08:28:13 UTC (rev 140516)
@@ -1,3 +1,22 @@
+2013-01-23  Kentaro Hara  <[email protected]>
+
+        [V8] Make an Isolate parameter mandatory in throwError()
+        https://bugs.webkit.org/show_bug.cgi?id=107636
+
+        Reviewed by Adam Barth.
+
+        No tests. No change in behavior.
+
+        * bindings/v8/NPV8Object.cpp:
+        (_NPN_SetException):
+        * bindings/v8/V8Binding.cpp:
+        (WebCore::handleMaxRecursionDepthExceeded):
+        * bindings/v8/V8Binding.h:
+        (WebCore):
+        * bindings/v8/WorkerScriptController.cpp:
+        (WebCore::WorkerScriptController::evaluate):
+        (WebCore::WorkerScriptController::setException):
+
 2013-01-22  Kentaro Hara  <[email protected]>
 
         [V8] Make an Isolate parameter mandatory in throwTypeError()

Modified: trunk/Source/WebCore/bindings/v8/NPV8Object.cpp (140515 => 140516)


--- trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2013-01-23 08:00:07 UTC (rev 140515)
+++ trunk/Source/WebCore/bindings/v8/NPV8Object.cpp	2013-01-23 08:28:13 UTC (rev 140516)
@@ -479,7 +479,7 @@
     if (!npObject || npObject->_class != npScriptObjectClass) {
         // We won't be able to find a proper scope for this exception, so just throw it.
         // This is consistent with JSC, which throws a global exception all the time.
-        throwError(v8GeneralError, message);
+        throwError(v8GeneralError, message, v8::Isolate::GetCurrent());
         return;
     }
     v8::HandleScope handleScope;
@@ -490,7 +490,7 @@
     v8::Context::Scope scope(context);
     ExceptionCatcher exceptionCatcher;
 
-    throwError(v8GeneralError, message);
+    throwError(v8GeneralError, message, context->GetIsolate());
 }
 
 bool _NPN_Enumerate(NPP npp, NPObject* npObject, NPIdentifier** identifier, uint32_t* count)

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.cpp (140515 => 140516)


--- trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2013-01-23 08:00:07 UTC (rev 140515)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.cpp	2013-01-23 08:28:13 UTC (rev 140516)
@@ -292,7 +292,7 @@
 
 v8::Local<v8::Value> handleMaxRecursionDepthExceeded()
 {
-    throwError(v8RangeError, "Maximum call stack size exceeded.");
+    throwError(v8RangeError, "Maximum call stack size exceeded.", v8::Isolate::GetCurrent());
     return v8::Local<v8::Value>();
 }
 

Modified: trunk/Source/WebCore/bindings/v8/V8Binding.h (140515 => 140516)


--- trunk/Source/WebCore/bindings/v8/V8Binding.h	2013-01-23 08:00:07 UTC (rev 140515)
+++ trunk/Source/WebCore/bindings/v8/V8Binding.h	2013-01-23 08:28:13 UTC (rev 140516)
@@ -62,10 +62,10 @@
     v8::Handle<v8::Value> setDOMException(int, v8::Isolate*);
 
     // Schedule a _javascript_ error to be thrown.
-    v8::Handle<v8::Value> throwError(V8ErrorType, const char*, v8::Isolate* = 0);
+    v8::Handle<v8::Value> throwError(V8ErrorType, const char*, v8::Isolate*);
 
     // Schedule a _javascript_ error to be thrown.
-    v8::Handle<v8::Value> throwError(v8::Local<v8::Value>, v8::Isolate* = 0);
+    v8::Handle<v8::Value> throwError(v8::Local<v8::Value>, v8::Isolate*);
 
     // A helper for throwing _javascript_ TypeError.
     v8::Handle<v8::Value> throwTypeError(const char*, v8::Isolate*);
@@ -463,6 +463,7 @@
     // If the current context causes out of memory, _javascript_ setting
     // is disabled and it returns true.
     bool handleOutOfMemory();
+    // FIXME: This should receive an Isolate.
     v8::Local<v8::Value> handleMaxRecursionDepthExceeded();
 
     void crashIfV8IsDead();

Modified: trunk/Source/WebCore/bindings/v8/WorkerScriptController.cpp (140515 => 140516)


--- trunk/Source/WebCore/bindings/v8/WorkerScriptController.cpp	2013-01-23 08:00:07 UTC (rev 140515)
+++ trunk/Source/WebCore/bindings/v8/WorkerScriptController.cpp	2013-01-23 08:28:13 UTC (rev 140516)
@@ -171,7 +171,7 @@
         state->lineNumber = message->GetLineNumber();
         state->sourceURL = toWebCoreString(message->GetScriptResourceName());
         if (m_workerContext->sanitizeScriptError(state->errorMessage, state->lineNumber, state->sourceURL))
-            state->exception = throwError(v8GeneralError, state->errorMessage.utf8().data());
+            state->exception = throwError(v8GeneralError, state->errorMessage.utf8().data(), m_context->GetIsolate());
         else
             state->exception = ScriptValue(block.Exception());
 
@@ -238,7 +238,7 @@
 
 void WorkerScriptController::setException(const ScriptValue& exception)
 {
-    throwError(*exception.v8Value());
+    throwError(*exception.v8Value(), m_context->GetIsolate());
 }
 
 WorkerScriptController* WorkerScriptController::controllerForContext()
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to