summaryrefslogtreecommitdiffstats
path: root/JavaScriptGlue
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptGlue')
-rw-r--r--JavaScriptGlue/ChangeLog40
-rw-r--r--JavaScriptGlue/Configurations/Version.xcconfig2
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/Atomics.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/MainThread.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeShared.h1
-rw-r--r--JavaScriptGlue/ForwardingHeaders/wtf/ThreadingPrimitives.h1
-rw-r--r--JavaScriptGlue/JSUtils.cpp29
7 files changed, 55 insertions, 20 deletions
diff --git a/JavaScriptGlue/ChangeLog b/JavaScriptGlue/ChangeLog
index 69a8208..d442a77 100644
--- a/JavaScriptGlue/ChangeLog
+++ b/JavaScriptGlue/ChangeLog
@@ -1,3 +1,43 @@
+2010-04-23 Sam Weinig <sam@webkit.org>
+
+ Reviewed by David Levin.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38060
+ Split up Threading.h
+
+ Add necessary forwarding headers.
+
+ * ForwardingHeaders/wtf/Atomics.h: Added.
+ * ForwardingHeaders/wtf/ThreadSafeShared.h: Added.
+ * ForwardingHeaders/wtf/ThreadingPrimitives.h: Added.
+
+2010-04-22 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Fix for https://bugs.webkit.org/show_bug.cgi?id=38022
+ Move isMainThread predicate function to MainThread.h
+
+ Added forwarding header for MainThread.h
+
+ * ForwardingHeaders/wtf/MainThread.h: Added.
+
+2010-04-22 Gavin Barraclough <barraclough@apple.com>
+
+ Rubber stamped by Sam Weinig
+
+ Do not get the globaldata for the APIShim via the
+ global object; global object construction creates identifiers
+ which results in the ASSERTs checking the thread data's
+ identifierTable has been set failing.
+
+ * JSUtils.cpp:
+ (unprotectGlobalObject):
+ (getThreadGlobalData):
+ (getThreadGlobalObject):
+ (JSGlueAPIEntry::JSGlueAPIEntry):
+ (JSGlueAPICallback::~JSGlueAPICallback):
+
2010-04-21 Geoffrey Garen <ggaren@apple.com>
Reviewed by Sam Weinig.
diff --git a/JavaScriptGlue/Configurations/Version.xcconfig b/JavaScriptGlue/Configurations/Version.xcconfig
index 6aeb263..cc5943e 100644
--- a/JavaScriptGlue/Configurations/Version.xcconfig
+++ b/JavaScriptGlue/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 533;
-MINOR_VERSION = 6;
+MINOR_VERSION = 9;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/Atomics.h b/JavaScriptGlue/ForwardingHeaders/wtf/Atomics.h
new file mode 100644
index 0000000..37b1892
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/Atomics.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/Atomics.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/MainThread.h b/JavaScriptGlue/ForwardingHeaders/wtf/MainThread.h
new file mode 100644
index 0000000..ff75971
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/MainThread.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/MainThread.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeShared.h b/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeShared.h
new file mode 100644
index 0000000..4a7a77f
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/ThreadSafeShared.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/ThreadSafeShared.h>
diff --git a/JavaScriptGlue/ForwardingHeaders/wtf/ThreadingPrimitives.h b/JavaScriptGlue/ForwardingHeaders/wtf/ThreadingPrimitives.h
new file mode 100644
index 0000000..a7ee117
--- /dev/null
+++ b/JavaScriptGlue/ForwardingHeaders/wtf/ThreadingPrimitives.h
@@ -0,0 +1 @@
+#include <JavaScriptCore/ThreadingPrimitives.h>
diff --git a/JavaScriptGlue/JSUtils.cpp b/JavaScriptGlue/JSUtils.cpp
index f2b7e64..b83ac52 100644
--- a/JavaScriptGlue/JSUtils.cpp
+++ b/JavaScriptGlue/JSUtils.cpp
@@ -395,9 +395,8 @@ static pthread_once_t globalObjectKeyOnce = PTHREAD_ONCE_INIT;
static void unprotectGlobalObject(void* data)
{
- JSGlobalObject* jsGlobalObject = static_cast<JSGlueGlobalObject*>(data);
- JSGlueAPIEntry entry(jsGlobalObject);
- gcUnprotect(jsGlobalObject);
+ JSGlueAPIEntry entry;
+ gcUnprotect(static_cast<JSGlueGlobalObject*>(data));
}
static void initializeGlobalObjectKey()
@@ -405,19 +404,18 @@ static void initializeGlobalObjectKey()
pthread_key_create(&globalObjectKey, unprotectGlobalObject);
}
+JSGlobalData* getThreadGlobalData()
+{
+ return &JSGlobalData::sharedInstance();
+}
+
static JSGlueGlobalObject* getThreadGlobalObject()
{
pthread_once(&globalObjectKeyOnce, initializeGlobalObjectKey);
JSGlueGlobalObject* globalObject = static_cast<JSGlueGlobalObject*>(pthread_getspecific(globalObjectKey));
if (!globalObject) {
- JSGlobalData& globalData = JSGlobalData::sharedInstance();
-
- IdentifierTable* storedIdentifierTable = wtfThreadData().currentIdentifierTable();
- wtfThreadData().setCurrentIdentifierTable(globalData.identifierTable);
- globalObject = new (&globalData) JSGlueGlobalObject(JSGlueGlobalObject::createStructure(jsNull()));
+ globalObject = new (getThreadGlobalData()) JSGlueGlobalObject(JSGlueGlobalObject::createStructure(jsNull()));
gcProtect(globalObject);
- wtfThreadData().setCurrentIdentifierTable(storedIdentifierTable);
-
pthread_setspecific(globalObjectKey, globalObject);
}
return globalObject;
@@ -437,14 +435,7 @@ JSGlueAPIEntry::JSGlueAPIEntry()
: m_lock(LockForReal)
, m_storedIdentifierTable(wtfThreadData().currentIdentifierTable())
{
- wtfThreadData().setCurrentIdentifierTable(getThreadGlobalObject()->globalExec()->globalData().identifierTable);
-}
-
-JSGlueAPIEntry::JSGlueAPIEntry(JSGlobalObject* jsGlobalObject)
- : m_lock(LockForReal)
- , m_storedIdentifierTable(wtfThreadData().currentIdentifierTable())
-{
- wtfThreadData().setCurrentIdentifierTable(jsGlobalObject->globalExec()->globalData().identifierTable);
+ wtfThreadData().setCurrentIdentifierTable(getThreadGlobalData()->identifierTable);
}
JSGlueAPIEntry::~JSGlueAPIEntry()
@@ -460,5 +451,5 @@ JSGlueAPICallback::JSGlueAPICallback(ExecState* exec)
JSGlueAPICallback::~JSGlueAPICallback()
{
- wtfThreadData().setCurrentIdentifierTable(getThreadGlobalObject()->globalExec()->globalData().identifierTable);
+ wtfThreadData().setCurrentIdentifierTable(getThreadGlobalData()->identifierTable);
}