Closed Bug 1183828 Opened 4 years ago Closed 4 years ago

2,700 instances of "nsWindow::GetNativeData not implemented for this type" emitted from widget/PuppetWidget.cpp during linux64 debug testing

Categories

(Core :: Widget, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: erahm, Assigned: erahm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #745145 +++

> 2732 [NNNNN] WARNING: nsWindow::GetNativeData not implemented for this type: file widget/PuppetWidget.cpp, line 1068

This warning [1], introduced in bug 745145 patch 3 shows up in the following test suites:

> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-browser-chrome-3-bm118-tests1-linux64-build0.txt:972
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-browser-chrome-2-bm67-tests1-linux64-build0.txt:799
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-browser-chrome-1-bm53-tests1-linux64-build0.txt:493
> mozilla-central_ubuntu64_vm-debug_test-mochitest-1-bm117-tests1-linux64-build1.txt:123
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-1-bm123-tests1-linux64-build25.txt:119
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-5-bm52-tests1-linux64-build2.txt:45
> mozilla-central_ubuntu64_vm-debug_test-mochitest-browser-chrome-2-bm117-tests1-linux64-build8.txt:38
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-4-bm122-tests1-linux64-build12.txt:30
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-3-bm51-tests1-linux64-build0.txt:29
> mozilla-central_ubuntu64_vm-debug_test-mochitest-e10s-2-bm53-tests1-linux64-build12.txt:28
> mozilla-central_ubuntu64_vm-debug_test-mochitest-2-bm67-tests1-linux64-build1.txt:20
> mozilla-central_ubuntu64_vm-debug_test-mochitest-other-bm53-tests1-linux64-build0.txt:16
> mozilla-central_ubuntu64_vm-debug_test-mochitest-browser-chrome-3-bm122-tests1-linux64-build17.txt:11
> mozilla-central_ubuntu64_vm-debug_test-mochitest-5-bm115-tests1-linux64-build29.txt:7
> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-2-bm123-tests1-linux64-build2.txt:1
> mozilla-central_ubuntu64_vm-debug_test-reftest-e10s-1-bm68-tests1-linux64-build0.txt:1

It shows up in 1001 tests. A few of the most prevalent:

> 42 - browser/components/sessionstore/test/browser_formdata_cc.js
> 38 - dom/manifest/test/browser_ManifestObtainer_obtain.js
> 36 - browser/base/content/test/general/browser_pageInfo.js
> 30 - browser/components/sessionstore/test/browser_615394-SSWindowState_events.js
> 30 - browser/components/sessionstore/test/browser_522545.js
> 28 - browser/base/content/test/general/browser_bug553455.js
> 21 - dom/html/test/browser_bug1108547.js
> 20 - browser/components/sessionstore/test/browser_595601-restore_hidden.js
> 19 - browser/components/sessionstore/test/browser_formdata_format.js
> 18 - toolkit/modules/tests/browser/browser_RemotePageManager.js

Given the prevalence across tests it feels like we can just remove the warning.

[1] https://hg.mozilla.org/mozilla-central/annotate/e786406bc683/widget/PuppetWidget.cpp#l1068
Assignee: nobody → erahm
Status: NEW → ASSIGNED
Comment on attachment 8636877 [details] [diff] [review]
Remove 'nsWindow::GetNativeData not implemented for this type' warning

Review of attachment 8636877 [details] [diff] [review]:
-----------------------------------------------------------------

What type is being passed in here, and what's the call stack?
Attachment #8636877 - Flags: review?(roc)
In e10s |browser/components/sessionstore/test/browser_formdata_cc.js| it's all |NS_NATIVE_WIDGET|.

Stacks all look like this:

> Breakpoint 1, mozilla::widget::PuppetWidget::GetNativeData (this=0x7f62e8547800, aDataType=<optimized out>) at /home/erahm/dev/mozilla-central/widget/PuppetWidget.cpp:1079
> 1079	    NS_WARNING("nsWindow::GetNativeData called with NS_NATIVE_WIDGET");
> (gdb) bt
> #0  mozilla::widget::PuppetWidget::GetNativeData (this=0x7f62e8547800, aDataType=<optimized out>) at /home/erahm/dev/mozilla-central/widget/PuppetWidget.cpp:1079
> #1  0x00007f6301cc7aba in nsWebBrowser::SetParentWidget (this=0x7f62f473b840, aParentWidget=<optimized out>)
>     at /home/erahm/dev/mozilla-central/embedding/browser/nsWebBrowser.cpp:1425
> #2  0x00007f6301cca3c1 in nsWebBrowser::InitWindow (this=0x7f62f473b840, aParentNativeWindow=<optimized out>, aParentWidget=<optimized out>, aX=0, aY=0, aCX=0, aCY=0)
>     at /home/erahm/dev/mozilla-central/embedding/browser/nsWebBrowser.cpp:1143
> #3  0x00007f630155eeb9 in mozilla::dom::TabChild::Init (this=0x7f62e8547000) at /home/erahm/dev/mozilla-central/dom/ipc/TabChild.cpp:1175
> #4  0x00007f6301563bc9 in mozilla::dom::TabChild::Create (aManager=0x7f62f601dc08, aTabId=..., aContext=..., aChromeFlags=aChromeFlags@entry=262144)
>     at /home/erahm/dev/mozilla-central/dom/ipc/TabChild.cpp:820
> #5  0x00007f630157d39c in mozilla::dom::nsIContentChild::AllocPBrowserChild (this=<optimized out>, aTabId=..., aContext=..., aChromeFlags=<optimized out>, aCpID=..., 
>     aIsForApp=<optimized out>, aIsForBrowser=@0x7ffe3dccae80: false) at /home/erahm/dev/mozilla-central/dom/ipc/nsIContentChild.cpp:61
> #6  0x00007f6300353f8e in mozilla::dom::PContentChild::OnMessageReceived (this=0x7f62f601d830, msg__=...)
>     at /home/erahm/dev/mozilla-central/obj-x86_64-unknown-linux-gnu/ipc/ipdl/PContentChild.cpp:5391
> #7  0x00007f6300092d0f in mozilla::ipc::MessageChannel::DispatchAsyncMessage (this=0x7f62f601d898, aMsg=...) at /home/erahm/dev/mozilla-central/ipc/glue/MessageChannel.cpp:1373

I'll do a try push to verify the warning is for the same type across the board.
From the try run:

- 2733 were NS_NATIVE_WIDGET
- 11 were NS_NATIVE_DISPLAY

Rough stack breakdown:

2,445 had this stack:

> #01: nsWebBrowser::InitWindow(void*, nsIWidget*, int, int, int, int) [embedding/browser/nsWebBrowser.cpp:1143]
> #02: mozilla::dom::TabChild::Init() [dom/ipc/TabChild.cpp:1176]
> #03: mozilla::dom::TabChild::Create(mozilla::dom::nsIContentChild*, mozilla::dom::IdType<mozilla::dom::TabParent> const&, mozilla::dom::TabContext const&, unsigned int) [dom/ipc/TabChild.cpp:820]
> #04: mozilla::dom::nsIContentChild::AllocPBrowserChild(mozilla::dom::IdType<mozilla::dom::TabParent> const&, mozilla::dom::IPCTabContext const&, unsigned int const&, mozilla::dom::IdType<mozilla::dom::ContentParent> const&, bool const&, bool const&) [mfbt/AlreadyAddRefed.h:116]
> #05: mozilla::dom::PContentChild::OnMessageReceived(IPC::Message const&) [obj-firefox/ipc/ipdl/PContentChild.cpp:5392]

275 had this stack:

> #01: nsWebBrowser::InitWindow(void*, nsIWidget*, int, int, int, int) [embedding/browser/nsWebBrowser.cpp:1143]
> #02: mozilla::dom::TabChild::Init() [dom/ipc/TabChild.cpp:1176]
> #03: mozilla::dom::TabChild::ProvideWindowCommon(nsIDOMWindow*, bool, unsigned int, bool, bool, bool, nsIURI*, nsAString_internal const&, nsACString_internal const&, bool*, nsIDOMWindow**) [dom/ipc/TabChild.cpp:1550]
> #04: mozilla::dom::TabChild::ProvideWindow(nsIDOMWindow*, unsigned int, bool, bool, bool, nsIURI*, nsAString_internal const&, nsACString_internal const&, bool*, nsIDOMWindow**) [dom/ipc/TabChild.cpp:1511]
> #05: nsWindowWatcher::OpenWindowInternal(nsIDOMWindow*, char const*, char const*, char const*, bool, bool, bool, nsITabParent*, nsIArray*, nsIDOMWindow**) [xpcom/glue/nsCOMPtr.h:693]

11 had this stack (these are the NS_NATIVE_DISPLAY ones):

> #01: nsPluginInstanceOwner::DispatchMouseToPlugin(nsIDOMEvent*, bool) [dom/plugins/base/nsPluginInstanceOwner.cpp:1588]
> #02: nsPluginInstanceOwner::HandleEvent(nsIDOMEvent*) [dom/plugins/base/nsPluginInstanceOwner.cpp:1646]
> #03: mozilla::EventListenerManager::HandleEventSubType(mozilla::EventListenerManager::Listener*, nsIDOMEvent*, mozilla::dom::EventTarget*) [dom/events/EventListenerManager.cpp:998]
> #04: mozilla::EventListenerManager::HandleEventInternal(nsPresContext*, mozilla::WidgetEvent*, nsIDOMEvent**, mozilla::dom::EventTarget*, nsEventStatus*) [dom/events/EventListenerManager.cpp:1147]
> #05: mozilla::EventTargetChainItem::HandleEvent(mozilla::EventChainPostVisitor&, mozilla::ELMCreationDetector&) [dom/events/EventListenerManager.h:330]

1 had this stack:

> #01: nsWebBrowser::InitWindow(void*, nsIWidget*, int, int, int, int) [embedding/browser/nsWebBrowser.cpp:1143]
> #02: nsAppShellService::CreateWindowlessBrowser(bool, nsIWebNavigation**) [xpfe/appshell/nsAppShellService.cpp:408]
> #03: NS_InvokeByIndex [xpcom/reflect/xptcall/md/unix/xptcinvoke_x86_64_unix.cpp:176]
> #04: CallMethodHelper::Call() [js/xpconnect/src/xpcprivate.h:873]
> #05: XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) [js/xpconnect/src/XPCWrappedNative.cpp:1382]
NATIVE_DISPLAY warnings are limited to these tests in browser chrome e10s:

> 4 - browser/base/content/test/plugins/browser_pluginnotification.js
> 3 - browser/base/content/test/plugins/browser_CTP_data_urls.js
> 2 - browser/base/content/test/plugins/browser_bug787619.js
> 2 - browser/base/content/test/plugins/browser_CTP_drag_drop.js
Comment on attachment 8636877 [details] [diff] [review]
Remove 'nsWindow::GetNativeData not implemented for this type' warning

roc, given the stacks and further analysis in comment 5 and comment 6 do you think it's okay to just remove the warning or should we look into it further?
Attachment #8636877 - Flags: feedback?(roc)
Thanks so much for doing that. Those don't look like real bugs. I suggest we make PuppetWidget return null for NS_NATIVE_WINDOW and NS_NATIVE_DISPLAY, without warning, but leave a warning for the other cases (the "called with bad value" warning suffices for them).
Attachment #8636877 - Attachment is obsolete: true
Attachment #8636877 - Flags: feedback?(roc)
Sorry that should have been WIDGET and DISPLAY.
Attachment #8638271 - Flags: review?(roc)
Attachment #8638269 - Attachment is obsolete: true
Attachment #8638269 - Flags: review?(roc)
url:        https://hg.mozilla.org/integration/mozilla-inbound/rev/d9518c1bb41d057cb94aa93db8898dddd17b98a0
changeset:  d9518c1bb41d057cb94aa93db8898dddd17b98a0
user:       Eric Rahm <erahm@mozilla.com>
date:       Sat Jul 25 10:43:27 2015 -0700
description:
Bug 1183828 - Remove 'nsWindow::GetNativeData not implemented for this type' warning. r=roc
https://hg.mozilla.org/mozilla-central/rev/d9518c1bb41d
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.