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

Unified Diff: WebCore/bindings/v8/WorkerScriptController.cpp

Issue 9572031: Don't be so CRASH happy in the bindings layer. (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/Source/
Patch Set: Created 8 years, 9 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: WebCore/bindings/v8/WorkerScriptController.cpp
===================================================================
--- WebCore/bindings/v8/WorkerScriptController.cpp (revision 109601)
+++ WebCore/bindings/v8/WorkerScriptController.cpp (working copy)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2012 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -53,6 +53,7 @@
: m_workerContext(workerContext)
, m_isolate(v8::Isolate::New())
, m_executionForbidden(false)
+ , m_executionScheduledToTerminate(false)
{
V8BindingPerIsolateData* data = V8BindingPerIsolateData::create(m_isolate);
data->allStores().append(&m_DOMDataStore);
@@ -92,9 +93,19 @@
void WorkerScriptController::scheduleExecutionTermination()
{
+ {
+ MutexLocker locker(m_scheduledTerminationMutex);
+ m_executionScheduledToTerminate = true;
+ }
v8::V8::TerminateExecution(m_isolate);
}
+bool WorkerScriptController::isExecutionTerminating() const
+{
+ MutexLocker locker(m_scheduledTerminationMutex);
+ return m_executionScheduledToTerminate;
+}
+
void WorkerScriptController::forbidExecution()
{
ASSERT(m_workerContext->isContextThread());
« no previous file with comments | « WebCore/bindings/v8/WorkerScriptController.h ('k') | WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698