Bug 174004 - Frame.h doesn't need to include FrameLoader.h, IntRect.h, and NavigationScheduler.h
Summary: Frame.h doesn't need to include FrameLoader.h, IntRect.h, and NavigationSched...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryosuke Niwa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-29 18:46 PDT by Ryosuke Niwa
Modified: 2017-07-01 21:02 PDT (History)
7 users (show)

See Also:


Attachments
Cleanup (30.35 KB, patch)
2017-06-29 19:24 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
WPE build fix attempt (30.98 KB, patch)
2017-06-29 19:44 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Another WPE build fix attempt (31.63 KB, patch)
2017-06-29 19:48 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-elcapitan (1.41 MB, application/zip)
2017-06-29 20:46 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 (1.24 MB, application/zip)
2017-06-29 21:01 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews124 for ios-simulator-wk2 (1.30 MB, application/zip)
2017-06-29 21:05 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews112 for mac-elcapitan (2.61 MB, application/zip)
2017-06-29 22:02 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-elcapitan (2.71 MB, application/zip)
2017-06-29 23:44 PDT, Build Bot
no flags Details
Fixed the tests (36.73 KB, patch)
2017-06-30 02:02 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Fixed the tests (31.11 KB, patch)
2017-06-30 02:04 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews115 for mac-elcapitan (2.33 MB, application/zip)
2017-06-30 04:01 PDT, Build Bot
no flags Details
Patch for landing (29.24 KB, patch)
2017-06-30 16:08 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Patch for landing (32.07 KB, patch)
2017-06-30 16:33 PDT, Ryosuke Niwa
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 (1.56 MB, application/zip)
2017-06-30 18:34 PDT, Build Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryosuke Niwa 2017-06-29 18:46:38 PDT
Remove these header dependencies.
Comment 1 Ryosuke Niwa 2017-06-29 19:24:10 PDT
Created attachment 314208 [details]
Cleanup
Comment 2 Ryosuke Niwa 2017-06-29 19:44:38 PDT
Created attachment 314212 [details]
WPE build fix attempt
Comment 3 Ryosuke Niwa 2017-06-29 19:48:23 PDT
Created attachment 314213 [details]
Another WPE build fix attempt
Comment 4 Ryosuke Niwa 2017-06-29 19:49:32 PDT
I know this builds on Mac & OS.
Comment 5 Build Bot 2017-06-29 20:46:12 PDT
Comment on attachment 314213 [details]
Another WPE build fix attempt

Attachment 314213 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/4023677

New failing tests:
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/choose-_self-001.html
http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html
fast/dom/Window/window-open-self-from-other-frame.html
http/tests/websocket/construct-in-detached-frame.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/choose-_self-002.html
Comment 6 Build Bot 2017-06-29 20:46:13 PDT
Created attachment 314220 [details]
Archive of layout-test-results from ews103 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 7 Ryosuke Niwa 2017-06-29 20:49:32 PDT
Oh, some tests are crashing. WTF!?
Comment 8 Build Bot 2017-06-29 21:01:35 PDT
Comment on attachment 314213 [details]
Another WPE build fix attempt

Attachment 314213 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4023766

New failing tests:
http/tests/websocket/construct-in-detached-frame.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html
Comment 9 Build Bot 2017-06-29 21:01:36 PDT
Created attachment 314224 [details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews104  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 10 Build Bot 2017-06-29 21:05:46 PDT
Comment on attachment 314213 [details]
Another WPE build fix attempt

Attachment 314213 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/4023691

New failing tests:
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/choose-_self-002.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-2.html
http/tests/websocket/construct-in-detached-frame.html
http/tests/security/xss-DENIED-xsl-document.xml
fast/dom/Window/window-open-self.html
Comment 11 Build Bot 2017-06-29 21:05:47 PDT
Created attachment 314225 [details]
Archive of layout-test-results from ews124 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews124  Port: ios-simulator-wk2  Platform: Mac OS X 10.12.5
Comment 12 Build Bot 2017-06-29 22:01:59 PDT
Comment on attachment 314213 [details]
Another WPE build fix attempt

Attachment 314213 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4023914

New failing tests:
inspector/dom/hideHighlight.html
inspector/dom/highlightSelector.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/choose-_self-001.html
http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
inspector/dom/highlightRect.html
inspector/dom/highlight-shape-outside-margin.html
fast/dom/Window/window-open-self-from-other-frame.html
http/tests/websocket/construct-in-detached-frame.html
inspector/dom/highlight-flow-with-no-region.html
inspector/dom/highlightFrame.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/choose-_self-002.html
inspector/dom/highlightNode.html
inspector/dom/highlightQuad.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html
Comment 13 Build Bot 2017-06-29 22:02:00 PDT
Created attachment 314232 [details]
Archive of layout-test-results from ews112 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews112  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 14 Build Bot 2017-06-29 23:44:51 PDT
Comment on attachment 314213 [details]
Another WPE build fix attempt

Attachment 314213 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4024481

New failing tests:
inspector/dom/hideHighlight.html
inspector/dom/highlightSelector.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/choose-_self-001.html
http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml
inspector/dom/highlightRect.html
inspector/dom/highlight-shape-outside-margin.html
fast/dom/Window/window-open-self-from-other-frame.html
http/tests/websocket/construct-in-detached-frame.html
inspector/dom/highlight-flow-with-no-region.html
inspector/dom/highlightFrame.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/choose-_self-002.html
inspector/dom/highlightNode.html
inspector/dom/highlightQuad.html
imported/w3c/web-platform-tests/html/browsers/windows/browsing-context-names/browsing-context-choose-self-1.html
Comment 15 Build Bot 2017-06-29 23:44:52 PDT
Created attachment 314241 [details]
Archive of layout-test-results from ews114 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 16 Ryosuke Niwa 2017-06-30 02:02:12 PDT
Created attachment 314250 [details]
Fixed the tests
Comment 17 Ryosuke Niwa 2017-06-30 02:04:25 PDT
Created attachment 314251 [details]
Fixed the tests
Comment 18 Build Bot 2017-06-30 04:01:32 PDT
Comment on attachment 314251 [details]
Fixed the tests

Attachment 314251 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/4025594

New failing tests:
inspector/dom/hideHighlight.html
inspector/dom/highlightSelector.html
inspector/dom/highlightRect.html
inspector/dom/highlight-shape-outside-margin.html
inspector/dom/highlightFrame.html
inspector/dom/highlightNode.html
inspector/dom/highlightQuad.html
inspector/dom/highlight-flow-with-no-region.html
Comment 19 Build Bot 2017-06-30 04:01:33 PDT
Created attachment 314255 [details]
Archive of layout-test-results from ews115 for mac-elcapitan

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews115  Port: mac-elcapitan  Platform: Mac OS X 10.11.6
Comment 20 Simon Fraser (smfr) 2017-06-30 13:15:59 PDT
Comment on attachment 314251 [details]
Fixed the tests

View in context: https://bugs.webkit.org/attachment.cgi?id=314251&action=review

> Source/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp:992
> +    core(m_webFrame)->createView(enclosingIntRect(logicalFrame).size(), backgroundColor, transparent, /* fixedLayoutSize */ IntSize(), /* fixedVisibleContentRect */IntRect());

Can't the default args be "{ }"?
Comment 21 Ryosuke Niwa 2017-06-30 16:08:51 PDT
Created attachment 314309 [details]
Patch for landing
Comment 22 Ryosuke Niwa 2017-06-30 16:09:31 PDT
Comment on attachment 314309 [details]
Patch for landing

Wait for EWS.
Comment 23 Ryosuke Niwa 2017-06-30 16:33:25 PDT
Created attachment 314317 [details]
Patch for landing
Comment 24 Ryosuke Niwa 2017-06-30 16:33:30 PDT
Comment on attachment 314309 [details]
Patch for landing

Oops, I forgot to resolve conflicts.
Comment 25 Ryosuke Niwa 2017-06-30 16:33:47 PDT
Comment on attachment 314317 [details]
Patch for landing

Wait for EWS.
Comment 26 Build Bot 2017-06-30 18:34:22 PDT
Comment on attachment 314317 [details]
Patch for landing

Attachment 314317 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/4030300

New failing tests:
fast/workers/worker-exception-during-navigation.html
Comment 27 Build Bot 2017-06-30 18:34:24 PDT
Created attachment 314345 [details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 28 Ryosuke Niwa 2017-06-30 21:25:32 PDT
(In reply to Build Bot from comment #26)
> Comment on attachment 314317 [details]
> Patch for landing
> 
> Attachment 314317 [details] did not pass mac-wk2-ews (mac-wk2):
> Output: http://webkit-queues.webkit.org/results/4030300
> 
> New failing tests:
> fast/workers/worker-exception-during-navigation.html

I don't think this crash is related to my patch:
Thread 45 Crashed:: WTF::AutomaticThread
0   com.apple.JavaScriptCore      	0x0000000108ae2dba WTF::ScopedLambdaRefFunctor<void (__darwin_x86_thread_state64&), JSC::VMTraps::SignalSender::work()::'lambda'(__darwin_x86_thread_state64&)>::implFunction(void*, __darwin_x86_thread_state64&) + 58 (JSLock.h:97)
1   com.apple.JavaScriptCore      	0x0000000108bd6c85 WTF::sendMessageScoped(WTF::Thread&, WTF::ScopedLambda<void (__darwin_x86_thread_state64&)> const&) + 85 (ThreadMessage.cpp:48)
2   com.apple.JavaScriptCore      	0x0000000108ae2b81 JSC::VMTraps::SignalSender::work() + 97 (ThreadMessage.h:49)
3   com.apple.JavaScriptCore      	0x0000000108b9edc0 WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 240 (AutomaticThread.cpp:217)
4   com.apple.JavaScriptCore      	0x0000000108bd61df WTF::threadEntryPoint(void*) + 111 (memory:2459)
5   com.apple.JavaScriptCore      	0x0000000108bd660a WTF::wtfThreadEntryPoint(void*) + 74 (utility:765)
6   libsystem_pthread.dylib       	0x00007fff8745599d _pthread_body + 131
7   libsystem_pthread.dylib       	0x00007fff8745591a _pthread_start + 168
8   libsystem_pthread.dylib       	0x00007fff87453351 thread_start + 13
Comment 29 Ryosuke Niwa 2017-07-01 14:26:33 PDT
Comment on attachment 314317 [details]
Patch for landing

Clearing flags on attachment: 314317

Committed r219051: <http://trac.webkit.org/changeset/219051>
Comment 30 Ryosuke Niwa 2017-07-01 14:26:36 PDT
All reviewed patches have been landed.  Closing bug.
Comment 31 Darin Adler 2017-07-01 20:45:49 PDT
These always could have been pointers. Originally they weren’t because we thought there was a performance benefit to not dereferencing a pointer or using a separate memory block. That seems to be what we should be discussing here. Is it OK to pay the extra overhead of a separate memory object for these two objects? Presumably the answer is yes, but I am not sure they go without saying.
Comment 32 Ryosuke Niwa 2017-07-01 20:59:15 PDT
(In reply to Darin Adler from comment #31)
> These always could have been pointers. Originally they weren’t because we
> thought there was a performance benefit to not dereferencing a pointer or
> using a separate memory block. That seems to be what we should be discussing
> here. Is it OK to pay the extra overhead of a separate memory object for
> these two objects? Presumably the answer is yes, but I am not sure they go
> without saying.

Frame is a rare enough object and the code that touches FrameLoader or NavigationScheduler are rare enough & not hot enough that this shouldn't matter but we should probably come up with some strategy to avoid allocating memory each time these member variables are allocated.

For example, we could come up with a mechanism to allocate memory for all these UniqueRef members at once instead of allocating for each one.
Comment 33 Darin Adler 2017-07-01 21:02:32 PDT
We don’t need to do anything fancy if there is no real problem. I was never concerned about the extra memory overhead of allocating a couple more malloc blocks, but I thought that adding to a pointer might be more efficient than dereferencing a pointer to find the frame loader given the frame.

If we’re sure that’s not significant then lets not worry about it.