summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/workers
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/workers')
-rw-r--r--Source/WebCore/workers/WorkerContext.cpp4
-rw-r--r--Source/WebCore/workers/WorkerContext.idl16
-rw-r--r--Source/WebCore/workers/WorkerScriptLoader.cpp9
-rw-r--r--Source/WebCore/workers/WorkerScriptLoader.h4
4 files changed, 21 insertions, 12 deletions
diff --git a/Source/WebCore/workers/WorkerContext.cpp b/Source/WebCore/workers/WorkerContext.cpp
index 36c4215..acf7f04 100644
--- a/Source/WebCore/workers/WorkerContext.cpp
+++ b/Source/WebCore/workers/WorkerContext.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 Apple Inc. All Rights Reserved.
- * Copyright (C) 2009 Google Inc. All Rights Reserved.
+ * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -249,7 +249,7 @@ void WorkerContext::importScripts(const Vector<String>& urls, ExceptionCode& ec)
InspectorInstrumentation::scriptImported(scriptExecutionContext(), scriptLoader.identifier(), scriptLoader.script());
ScriptValue exception;
- m_script->evaluate(ScriptSourceCode(scriptLoader.script(), *it), &exception);
+ m_script->evaluate(ScriptSourceCode(scriptLoader.script(), scriptLoader.responseURL()), &exception);
if (!exception.hasNoValue()) {
m_script->setException(exception);
return;
diff --git a/Source/WebCore/workers/WorkerContext.idl b/Source/WebCore/workers/WorkerContext.idl
index ccbd964..179221e 100644
--- a/Source/WebCore/workers/WorkerContext.idl
+++ b/Source/WebCore/workers/WorkerContext.idl
@@ -114,14 +114,14 @@ module threads {
attribute [EnabledAtRuntime=FileSystem] FlagsConstructor Flags;
#endif
- attribute [Conditional=BLOB,EnabledAtRuntime] ArrayBufferConstructor ArrayBuffer; // Usable with new operator
- attribute [Conditional=BLOB,EnabledAtRuntime] Int8ArrayConstructor Int8Array; // Usable with new operator
- attribute [Conditional=BLOB,EnabledAtRuntime] Uint8ArrayConstructor Uint8Array; // Usable with new operator
- attribute [Conditional=BLOB,EnabledAtRuntime] Int16ArrayConstructor Int16Array; // Usable with new operator
- attribute [Conditional=BLOB,EnabledAtRuntime] Uint16ArrayConstructor Uint16Array; // Usable with new operator
- attribute [Conditional=BLOB,EnabledAtRuntime] Int32ArrayConstructor Int32Array; // Usable with new operator
- attribute [Conditional=BLOB,EnabledAtRuntime] Uint32ArrayConstructor Uint32Array; // Usable with new operator
- attribute [Conditional=BLOB,EnabledAtRuntime] Float32ArrayConstructor Float32Array; // Usable with new operator
+ attribute ArrayBufferConstructor ArrayBuffer; // Usable with new operator
+ attribute Int8ArrayConstructor Int8Array; // Usable with new operator
+ attribute Uint8ArrayConstructor Uint8Array; // Usable with new operator
+ attribute Int16ArrayConstructor Int16Array; // Usable with new operator
+ attribute Uint16ArrayConstructor Uint16Array; // Usable with new operator
+ attribute Int32ArrayConstructor Int32Array; // Usable with new operator
+ attribute Uint32ArrayConstructor Uint32Array; // Usable with new operator
+ attribute Float32ArrayConstructor Float32Array; // Usable with new operator
};
}
diff --git a/Source/WebCore/workers/WorkerScriptLoader.cpp b/Source/WebCore/workers/WorkerScriptLoader.cpp
index 1786b89..2224d87 100644
--- a/Source/WebCore/workers/WorkerScriptLoader.cpp
+++ b/Source/WebCore/workers/WorkerScriptLoader.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2009 Apple Inc. All Rights Reserved.
- * Copyright (C) 2009 Google Inc. All Rights Reserved.
+ * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -87,6 +87,12 @@ void WorkerScriptLoader::loadAsynchronously(ScriptExecutionContext* scriptExecut
m_threadableLoader = ThreadableLoader::create(scriptExecutionContext, this, *request, options);
}
+const KURL& WorkerScriptLoader::responseURL() const
+{
+ ASSERT(!failed());
+ return m_responseURL;
+}
+
PassOwnPtr<ResourceRequest> WorkerScriptLoader::createResourceRequest()
{
OwnPtr<ResourceRequest> request(new ResourceRequest(m_url));
@@ -101,6 +107,7 @@ void WorkerScriptLoader::didReceiveResponse(const ResourceResponse& response)
m_failed = true;
return;
}
+ m_responseURL = response.url();
m_responseEncoding = response.textEncodingName();
if (m_client)
m_client->didReceiveResponse(response);
diff --git a/Source/WebCore/workers/WorkerScriptLoader.h b/Source/WebCore/workers/WorkerScriptLoader.h
index fc8b0b4..98e21e1 100644
--- a/Source/WebCore/workers/WorkerScriptLoader.h
+++ b/Source/WebCore/workers/WorkerScriptLoader.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2009 Apple Inc. All Rights Reserved.
- * Copyright (C) 2009 Google Inc. All Rights Reserved.
+ * Copyright (C) 2009, 2011 Google Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -53,6 +53,7 @@ namespace WebCore {
const String& script() const { return m_script; }
const KURL& url() const { return m_url; }
+ const KURL& responseURL() const;
bool failed() const { return m_failed; }
unsigned long identifier() const { return m_identifier; }
@@ -73,6 +74,7 @@ namespace WebCore {
RefPtr<TextResourceDecoder> m_decoder;
String m_script;
KURL m_url;
+ KURL m_responseURL;
bool m_failed;
unsigned long m_identifier;
ResourceRequestBase::TargetType m_targetType;