Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(410)

Unified Diff: Source/bindings/v8/WorkerScriptController.h

Issue 22467005: Correctly attribute exceptions thrown inside a Worker's imported scripts. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tests. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/WorkerScriptController.h
diff --git a/Source/bindings/v8/WorkerScriptController.h b/Source/bindings/v8/WorkerScriptController.h
index 4e72f3054eddccc4f0a31d8438de93312f8ddcd7..db806c0384d0527b7f6806da59cb2e95b3992dea 100644
--- a/Source/bindings/v8/WorkerScriptController.h
+++ b/Source/bindings/v8/WorkerScriptController.h
@@ -33,10 +33,11 @@
#include "bindings/v8/ScriptValue.h"
#include "bindings/v8/V8Binding.h"
-#include <v8.h>
+#include "core/dom/ErrorEvent.h"
#include "wtf/OwnPtr.h"
#include "wtf/Threading.h"
#include "wtf/text/TextPosition.h"
+#include <v8.h>
namespace WebCore {
@@ -67,9 +68,9 @@ namespace WebCore {
WorkerGlobalScope* workerGlobalScope() { return m_workerGlobalScope; }
- void evaluate(const ScriptSourceCode&, ScriptValue* = 0);
+ void evaluate(const ScriptSourceCode&, RefPtr<ErrorEvent>* = 0);
- void setException(const ScriptValue&);
+ void rethrowExceptionFromImportedScript(PassRefPtr<ErrorEvent>);
// Async request to terminate a future JS execution. Eventually causes termination
// exception raised during JS execution, if the worker thread happens to run JS.
@@ -113,6 +114,7 @@ namespace WebCore {
bool m_executionForbidden;
bool m_executionScheduledToTerminate;
mutable Mutex m_scheduledTerminationMutex;
+ RefPtr<ErrorEvent> m_errorEventFromImportedScript;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698