| Index: Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| diff --git a/Source/web/ServiceWorkerGlobalScopeProxy.cpp b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| index f87bdefde6edc1f30d9d4e85a8ce65d90f42c023..06d559f9903e81e31801540dd65bd3d38fe04c94 100644
|
| --- a/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| +++ b/Source/web/ServiceWorkerGlobalScopeProxy.cpp
|
| @@ -35,6 +35,7 @@
|
| #include "core/dom/CrossThreadTask.h"
|
| #include "core/dom/ExecutionContext.h"
|
| #include "core/dom/MessagePort.h"
|
| +#include "core/events/ErrorEvent.h"
|
| #include "core/events/MessageEvent.h"
|
| #include "core/workers/WorkerGlobalScope.h"
|
| #include "modules/push_messaging/PushEvent.h"
|
| @@ -63,6 +64,14 @@ ServiceWorkerGlobalScopeProxy::~ServiceWorkerGlobalScopeProxy()
|
| {
|
| }
|
|
|
| +void ServiceWorkerGlobalScopeProxy::evaluate(const ScriptSourceCode& javascript)
|
| +{
|
| + RefPtrWillBeRawPtr<ErrorEvent> error;
|
| + m_workerGlobalScope->script()->evaluate(javascript, &error);
|
| + if (error)
|
| + m_client.reportException(error->message(), error->lineno(), error->colno(), error->filename());
|
| +}
|
| +
|
| void ServiceWorkerGlobalScopeProxy::dispatchInstallEvent(int eventID)
|
| {
|
| ASSERT(m_workerGlobalScope);
|
| @@ -114,6 +123,11 @@ void ServiceWorkerGlobalScopeProxy::dispatchSyncEvent(int eventID)
|
| ServiceWorkerGlobalScopeClient::from(m_workerGlobalScope)->didHandleSyncEvent(eventID);
|
| }
|
|
|
| +v8::Handle<v8::Context> ServiceWorkerGlobalScopeProxy::v8Context()
|
| +{
|
| + return m_workerGlobalScope->script()->context();
|
| +}
|
| +
|
| void ServiceWorkerGlobalScopeProxy::reportException(const String& errorMessage, int lineNumber, int columnNumber, const String& sourceURL)
|
| {
|
| m_client.reportException(errorMessage, lineNumber, columnNumber, sourceURL);
|
|
|