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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp

Issue 2324693003: Worker: Check forcible termination by WorkerThread::isForciblyTerminated() (Closed)
Patch Set: remove unnecessary header inclusion Created 4 years, 3 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: third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
index 93a418c0a619645ebcea5a3c0dad973b1fa9df37..a15714aed67df4550aeb6207f014f7ca7d44dd63 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WorkerOrWorkletScriptController.cpp
@@ -34,22 +34,17 @@
#include "bindings/core/v8/ScriptSourceCode.h"
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/SourceLocation.h"
-#include "bindings/core/v8/V8DedicatedWorkerGlobalScope.h"
+#include "bindings/core/v8/V8DOMWrapper.h"
#include "bindings/core/v8/V8ErrorHandler.h"
#include "bindings/core/v8/V8Initializer.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "bindings/core/v8/V8ScriptRunner.h"
-#include "bindings/core/v8/V8SharedWorkerGlobalScope.h"
-#include "bindings/core/v8/V8WorkerGlobalScope.h"
#include "bindings/core/v8/WrapperTypeInfo.h"
#include "core/events/ErrorEvent.h"
-#include "core/frame/DOMTimer.h"
#include "core/inspector/InspectorTraceEvents.h"
-#include "core/inspector/MainThreadDebugger.h"
#include "core/inspector/WorkerThreadDebugger.h"
-#include "core/workers/MainThreadWorkletGlobalScope.h"
+#include "core/workers/WorkerGlobalScope.h"
#include "core/workers/WorkerOrWorkletGlobalScope.h"
-#include "core/workers/WorkerThread.h"
#include "platform/heap/ThreadState.h"
#include "public/platform/Platform.h"
#include <memory>
@@ -109,7 +104,6 @@ WorkerOrWorkletScriptController::WorkerOrWorkletScriptController(WorkerOrWorklet
: m_globalScope(globalScope)
, m_isolate(isolate)
, m_executionForbidden(false)
- , m_executionScheduledToTerminate(false)
, m_rejectedPromises(RejectedPromises::create())
, m_executionState(0)
{
@@ -280,22 +274,6 @@ bool WorkerOrWorkletScriptController::evaluate(const ScriptSourceCode& sourceCod
return true;
}
-void WorkerOrWorkletScriptController::willScheduleExecutionTermination()
-{
- // The mutex provides a memory barrier to ensure that once
- // termination is scheduled, isExecutionTerminating will
- // accurately reflect that state when called from another thread.
- MutexLocker locker(m_scheduledTerminationMutex);
- m_executionScheduledToTerminate = true;
-}
-
-bool WorkerOrWorkletScriptController::isExecutionTerminating() const
-{
- // See comments in willScheduleExecutionTermination regarding mutex usage.
- MutexLocker locker(m_scheduledTerminationMutex);
- return m_executionScheduledToTerminate;
-}
-
void WorkerOrWorkletScriptController::forbidExecution()
{
ASSERT(m_globalScope->isContextThread());

Powered by Google App Engine
This is Rietveld 408576698