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.
Created attachment 138265 [details] Patch
Would you please have a look?
Comment on attachment 138265 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=138265&action=review > Source/WebCore/ChangeLog:12 > + No new tests. The current test has covered it already. Which test? > Source/WebCore/workers/Worker.cpp:75 > #endif Should we add an assert here to verify the target type?
(In reply to comment #3) > (From update of attachment 138265 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=138265&action=review > > > Source/WebCore/ChangeLog:12 > > + No new tests. The current test has covered it already. > > Which test? This patch just deleted a duplicated statement. It can't impact any features. So no test case is required. > > > Source/WebCore/workers/Worker.cpp:75 > > #endif > > Should we add an assert here to verify the target type? There isn't public function to get the target type in current code, if we need to assert the target type, I must add the new function for chromium platform, it indeed adds the difficulty of code. And in WorkerScriptLoader Constructor, there is a obvious statement about the target type, and no change about the value. Maybe it isn't necessary to add the assert statement. do you think so? Thanks for your review.
(In reply to comment #4) > (In reply to comment #3) > > (From update of attachment 138265 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=138265&action=review > > > > > Source/WebCore/ChangeLog:12 > > > + No new tests. The current test has covered it already. > > > > Which test? > This patch just deleted a duplicated statement. It can't impact any features. So no test case is required. You said in the change log that "The current test has covered it already." Which test covers this? Which test will fail if this value is incorrect? (It would be nice to make sure something is going to fail if someone changes the default value in chromium.) Why is this change being done? :) > > > > > Source/WebCore/workers/Worker.cpp:75 > > > #endif > > > > Should we add an assert here to verify the target type? > There isn't public function to get the target type in current code, if we need to assert the target type, I must add the new function for chromium platform, it indeed adds the difficulty of code. > And in WorkerScriptLoader Constructor, there is a obvious statement about the target type, and no change about the value. Maybe it isn't necessary to add the assert statement. do you think so? > > Thanks for your review.
(In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > (From update of attachment 138265 [details] [details] [details]) > > > View in context: https://bugs.webkit.org/attachment.cgi?id=138265&action=review > > > > > > > Source/WebCore/ChangeLog:12 > > > > + No new tests. The current test has covered it already. > > > > > > Which test? > > This patch just deleted a duplicated statement. It can't impact any features. So no test case is required. > > You said in the change log that "The current test has covered it already." > > Which test covers this? Which test will fail if this value is incorrect? (It would be nice to make sure something is going to fail if someone changes the default value in chromium.) > > Why is this change being done? :) > Okay, I will change the log, thanks for your detailed review.
Created attachment 138509 [details] Patch
Add the detailed description in ChangLog, please have a look, thanks.
Created attachment 138513 [details] Patch
The ChangeLog doesn't answer the question: What test would fail if this value is incorrect? (It would be nice to know that there is one.)
Comment on attachment 138513 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=138513&action=review > Source/WebCore/ChangeLog:13 > + No new tests because this patch just deletes a repeated code, it can reduce code workload and can't impact any feature. This may impact features if the target type is set incorrectly and may result in a change in behavior so it would be good to know the test that would expose if there were this problem.
Created attachment 138740 [details] Patch
Comment on attachment 138740 [details] Patch I wonder why http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/workers/WorkerScriptLoader.cpp&type=cs&l=55 isn't changed to be "|| PLATFORM(BLACKBERRY)" and then just get rid of this. But this is fine as is. Thanks!
(In reply to comment #13) > (From update of attachment 138740 [details]) > I wonder why http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/workers/WorkerScriptLoader.cpp&type=cs&l=55 isn't changed to be "|| PLATFORM(BLACKBERRY)" and then just get rid of this. > > But this is fine as is. Thanks! You should look this linked address. http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/workers/Worker.cpp&type=cs&l=73
(In reply to comment #14) > (In reply to comment #13) > > (From update of attachment 138740 [details] [details]) > > I wonder why http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/workers/WorkerScriptLoader.cpp&type=cs&l=55 isn't changed to be "|| PLATFORM(BLACKBERRY)" and then just get rid of this. > > > > But this is fine as is. Thanks! > > You should look this linked address. http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/workers/Worker.cpp&type=cs&l=73 I don't understand what you are saying. The line that you referred to is the code you are changing. Here's what I was saying. On blackberry, this field is uninitialized because on this line http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/workers/WorkerScriptLoader.cpp&type=cs&l=55 it is only initialized for Chromium. If we changed that line to also initialize the field for blackberry, then this line http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/workers/Worker.cpp&type=cs&l=73 would be necessary on blackberry either and it could be removed.
Comment on attachment 138740 [details] Patch Clearing flags on attachment: 138740 Committed r115207: <http://trac.webkit.org/changeset/115207>
All reviewed patches have been landed. Closing bug.