Title: [115207] trunk/Source/WebCore
Revision
115207
Author
[email protected]
Date
2012-04-25 07:52:06 -0700 (Wed, 25 Apr 2012)

Log Message

[chromium][workers] setTargetType(ResourceRequest::TargetIsWorker) is repeatedly called in chromium
https://bugs.webkit.org/show_bug.cgi?id=84542

Patch by Li Yin <[email protected]> on 2012-04-25
Reviewed by David Levin.

In chromium platform, the default value of m_targetType is ResourceRequest::TargetIsWorker
it isn't necessary to call
worker->m_scriptLoader->setTargetType(ResourceRequest::TargetIsWorker) again in Worker.cpp
In chromium platform, the m_targettype value determines the priority of resource loaded.

No new tests because this patch just deletes a repeated code, it can reduce code workload and can't impact any feature.
If the target type isn't set correctly, the following test maybe fail because of timeout in the chromium.
fast/workers/storage/multiple-transactions-on-different-handles.html
fast/workers/storage/multiple-transactions-on-different-handles-sync.html
fast/workers/storage/interrupt-database.html

* workers/Worker.cpp:
(WebCore::Worker::create):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (115206 => 115207)


--- trunk/Source/WebCore/ChangeLog	2012-04-25 14:42:24 UTC (rev 115206)
+++ trunk/Source/WebCore/ChangeLog	2012-04-25 14:52:06 UTC (rev 115207)
@@ -1,3 +1,24 @@
+2012-04-25  Li Yin  <[email protected]>
+
+        [chromium][workers] setTargetType(ResourceRequest::TargetIsWorker) is repeatedly called in chromium
+        https://bugs.webkit.org/show_bug.cgi?id=84542
+
+        Reviewed by David Levin.
+
+        In chromium platform, the default value of m_targetType is ResourceRequest::TargetIsWorker
+        it isn't necessary to call
+        worker->m_scriptLoader->setTargetType(ResourceRequest::TargetIsWorker) again in Worker.cpp
+        In chromium platform, the m_targettype value determines the priority of resource loaded.
+
+        No new tests because this patch just deletes a repeated code, it can reduce code workload and can't impact any feature.
+        If the target type isn't set correctly, the following test maybe fail because of timeout in the chromium.
+        fast/workers/storage/multiple-transactions-on-different-handles.html
+        fast/workers/storage/multiple-transactions-on-different-handles-sync.html
+        fast/workers/storage/interrupt-database.html
+
+        * workers/Worker.cpp:
+        (WebCore::Worker::create):
+
 2012-04-25  Yury Semikhatsky  <[email protected]>
 
         Web Inspector: move HeapSnapshotLoader into a separate file

Modified: trunk/Source/WebCore/workers/Worker.cpp (115206 => 115207)


--- trunk/Source/WebCore/workers/Worker.cpp	2012-04-25 14:42:24 UTC (rev 115206)
+++ trunk/Source/WebCore/workers/Worker.cpp	2012-04-25 14:52:06 UTC (rev 115207)
@@ -70,7 +70,7 @@
     worker->setPendingActivity(worker.get());
 
     worker->m_scriptLoader = WorkerScriptLoader::create();
-#if PLATFORM(CHROMIUM) || PLATFORM(BLACKBERRY)
+#if PLATFORM(BLACKBERRY)
     worker->m_scriptLoader->setTargetType(ResourceRequest::TargetIsWorker);
 #endif
     worker->m_scriptLoader->loadAsynchronously(context, scriptURL, DenyCrossOriginRequests, worker.get());
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to