summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/workers
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-25 08:15:24 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-05-25 08:15:24 -0700
commitfa91a01aee5d4a80ca6c80f722116b850f09996c (patch)
treef72740e60d3c3d4f0ab144e88c03d1f134944ce3 /Source/WebCore/workers
parent96f37d6d1b390f6690858789706ee6ec25bc1677 (diff)
parentfeebf8e7a79ad68b04a1a948e2b8078d6e5f0048 (diff)
downloadexternal_webkit-fa91a01aee5d4a80ca6c80f722116b850f09996c.zip
external_webkit-fa91a01aee5d4a80ca6c80f722116b850f09996c.tar.gz
external_webkit-fa91a01aee5d4a80ca6c80f722116b850f09996c.tar.bz2
Merge changes I78ff6a85,Ic85c6405,Ibf903baa,I3a0459db,I35140385,I54790419,I6bfe5d24,Ia9f39b83,I5bcecd5a,I1de96683,I543c6810,I8a5b0878,I0ae670bf,Ide4d58dc,I28ebaf3d,I499d6631,Ie5090e0d,I6d3e5f1f
* changes: Merge WebKit at r78450: Update ThirdPartyProject.prop Merge WebKit at r78450: Add new Font::canExpandAroundIdeographsInComplexText() Merge WebKit at r78450: Add new ChromeClient::selectItemAlignmentFollowsMenuWritingDirection() Merge WebKit at r78450: FrameLoaderClient::didRunInsecureContent() signature changed Merge WebKit at r78450: HTMLAreaElement::getRect() renamed Merge WebKit at r78450: FrameLoader::url() removed Merge WebKit at r78450: HTMLParserQuirks removed Merge WebKit at r78450: TextRun::padding() renamed Merge WebKit at r78450: Use new FontMetrics Merge WebKit at r78450: GraphicsContext current path removed Merge WebKit at r78450: TransformationMatrix multiply methods renamed and meaning changed Merge WebKit at r78450: FontCustomPlatformData::fontPlatformData() signature changed Merge WebKit at r78450: IntRect::bottom()/right() renamed Merge WebKit at r78450: Fix remaining conflicts Merge WebKit at r78450: Fix conflicts due to new ENABLE_WEB_ARCHIVE guard Merge WebKit at r78450: Fix conflicts in media controls Merge WebKit at r78450: Fix Makefiles Merge WebKit at r78450: Initial merge by git.
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;