Closed Bug 1618539 Opened 6 years ago Closed 6 years ago

Remove content-process use of nsIFocusManager::GetActiveWindow

Categories

(Core :: DOM: UI Events & Focus Handling, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Fission Milestone M6
Tracking Status
firefox76 --- fixed

People

(Reporter: hsivonen, Assigned: hsivonen)

References

Details

Attachments

(1 file)

There's a non-XPCOM version.

I searched the code wrong. We have lots of JS callers. Most of them want to compare a window object that they already have for equality or inequality with Services.focus.activeWindow.

Without exposing BrowsingContext to JS, we could add a method IsActiveWindow to nsIFocusManager to do the actual comparison on the C++ side.

But first, let's find out if any of that JS runs outside the parent process.

(In reply to Henri Sivonen (:hsivonen) from comment #1)

But first, let's find out if any of that JS runs outside the parent process.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=8e59e647ebc8fe602817f3f8f0b1d01916d4e18f

This test gets activeWindow outside the parent process:
https://searchfox.org/mozilla-central/source/dom/base/test/chrome/bug418986-1.js

Not sure how that's supposed to work.

(In reply to Henri Sivonen (:hsivonen) from comment #3)

This test gets activeWindow outside the parent process:
https://searchfox.org/mozilla-central/source/dom/base/test/chrome/bug418986-1.js

Not sure how that's supposed to work.

Do we have a better way of getting chrome-privileged access to a window object in a SpecialPowers test case?

Flags: needinfo?(enndeakin)

So this (In reply to Henri Sivonen (:hsivonen) from comment #3)

Not sure how that's supposed to work.

You can access the active window, with SpecialPowers.activeWindow, which could be adjusted/altered as needed. That said, from a focus perspective, the test just wants access to the top-level window the code is running in, and doesn't look to actually care whether it is active or not.

Also, this is a chrome test, so only runs with e10s disabled. It should probably be rewritten as a browser test, which would remove the issue I think.

Flags: needinfo?(enndeakin)

(In reply to Neil Deakin from comment #6)

You can access the active window, with SpecialPowers.activeWindow, which could be adjusted/altered as needed. That said, from a focus perspective, the test just wants access to the top-level window the code is running in, and doesn't look to actually care whether it is active or not.

Even accessing the top-level window seems like problem in a Fission scenario.

Also, this is a chrome test, so only runs with e10s disabled.

I'm confused. This looks to me like it's running as mochitest-plain. If it ran without e10s, why would XRE_IsParentProcess() return false?

The test was initially written as a XUL mochitest-chrome and was later migrated to HTML + mochitest-plain + SpecialPowers. As far as I can tell, ever since e10s, the test hasn't really been looking at the chrome window but the top-level content window, so testing both window and chromeWindow has been useless and the >= comparisons have always evaluated to equal.

I think I'm just going to remove the chromeWindow part of this test.

(In reply to Henri Sivonen (:hsivonen) from comment #4)

https://searchfox.org/mozilla-central/source/browser/components/urlbar/tests/browser/browser_locationBarExternalLoad.js could be addressed by an IsActiveWindow method.

Seems excessive to add such an API just for this test.

Summary: Remove XPCOM version of nsIFocusManager::GetActiveWindow → Remove content-process use of nsIFocusManager::GetActiveWindow

Scoping this down to removing content process usage.

Tracking for Fission Nightly (M6) since this bug transitively blocks M6 bug 1614268.

Fission Milestone: --- → M6
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e50cbce87f8d Remove content-process use of nsIFocusManager::GetActiveWindow. r=NeilDeakin

I should have had more test suites in my try run:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294020613&repo=autoland&lineNumber=4128

The test that asserts is https://searchfox.org/mozilla-central/source/dom/media/test/crashtests/1388372.html , which suggests that the getUserMedia implementation internally calls nsIFocusManager::GetActiveWindow outside the parent process.

Backed out changeset e50cbce87f8d (bug 1618539) for nsFocusManager related crashes

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=android%2C7.0%2Cx86-64%2Cquantumrender%2Cdebug%2Creftests%2Ctest-android-em-7.0-x86_64-qr%2Fdebug-geckoview-crashtest-e10s%2Cr%28c%29&fromchange=f77503528c34ba8e0820b7ba524320a3bd734e15&tochange=c513a6ad4e2ea3a2d68d6596ddc0d7c0cc53d27a&selectedJob=294020613

Backout link: https://hg.mozilla.org/integration/autoland/rev/c513a6ad4e2ea3a2d68d6596ddc0d7c0cc53d27a

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294020613&repo=autoland&lineNumber=9671

...
[task 2020-03-20T09:03:45.122Z] 09:03:45     INFO -  0x7c949ef29000 - 0x7c949ef2afff  dalvik-mark sweep sweep array free buffer (deleted)  ???  (WARNING: No symbols, , )
[task 2020-03-20T09:03:45.122Z] 09:03:45     INFO -  0x7c949ef2b000 - 0x7c949ef4afff  u:object_r:default_prop:s0  ???  (WARNING: No symbols, , )
[task 2020-03-20T09:03:45.122Z] 09:03:45     INFO -  0x7c949ef4b000 - 0x7c949ef6afff  properties_serial  ???  (WARNING: No symbols, , )
[task 2020-03-20T09:03:45.122Z] 09:03:45     INFO -  0x7c949ef7b000 - 0x7c949ef7ffff  event-log-tags  ???
[task 2020-03-20T09:03:45.123Z] 09:03:45     INFO -  0x7c949ef84000 - 0x7c949efa3fff  properties_serial  ???  (WARNING: No symbols, , )
[task 2020-03-20T09:03:45.123Z] 09:03:45     INFO -  0x7c949efb7000 - 0x7c949f08afff  linker64  ???
[task 2020-03-20T09:03:45.123Z] 09:03:45     INFO -  0x7c949f09a000 - 0x7c949f09dfff  app_process64  ???  (main)  (WARNING: No symbols, app_process64, 3728C8E32CFE2E6BA4EABDCF23C990690)
[task 2020-03-20T09:03:45.123Z] 09:03:45     INFO -  0x7fff04ba2000 - 0x7fff04ba3fff  linux-gate.so  ???  (WARNING: No symbols, linux-gate.so, A458B3F982A5B317B3E49144CA9A1C660)
[task 2020-03-20T09:03:45.123Z] 09:03:45     INFO -  REFTEST INFO | Copy/paste: /builds/worker/fetches/minidump_stackwalk/minidump_stackwalk /tmp/tmpiuebVy/4e5c4238-5c4b-befd-5922-2160a290645a.dmp /builds/worker/workspace/build/symbols
[task 2020-03-20T09:03:49.074Z] 09:03:49     INFO -  REFTEST INFO | Saved minidump as /builds/worker/workspace/build/blobber_upload_dir/4e5c4238-5c4b-befd-5922-2160a290645a.dmp
[task 2020-03-20T09:03:49.074Z] 09:03:49     INFO -  REFTEST INFO | Saved app info as /builds/worker/workspace/build/blobber_upload_dir/4e5c4238-5c4b-befd-5922-2160a290645a.extra
[task 2020-03-20T09:03:49.080Z] 09:03:49  WARNING -  REFTEST PROCESS-CRASH | dom/media/test/crashtests/1388372.html | application crashed [@ nsFocusManager::GetActiveWindow(mozIDOMWindowProxy**)]
[task 2020-03-20T09:03:49.080Z] 09:03:49     INFO -  Mozilla crash reason: MOZ_ASSERT(XRE_IsParentProcess()) (Must not be called outside the parent process.)
[task 2020-03-20T09:03:49.080Z] 09:03:49     INFO -  Crash dump filename: /tmp/tmpiuebVy/4e5c4238-5c4b-befd-5922-2160a290645a.dmp
[task 2020-03-20T09:03:49.080Z] 09:03:49     INFO -  Operating system: Android
[task 2020-03-20T09:03:49.080Z] 09:03:49     INFO -                    0.0.0 Linux 3.10.0+ #260 SMP PREEMPT Fri May 19 12:48:14 PDT 2017 x86_64
[task 2020-03-20T09:03:49.080Z] 09:03:49     INFO -  CPU: amd64
[task 2020-03-20T09:03:49.081Z] 09:03:49     INFO -       family 6 model 6 stepping 3
[task 2020-03-20T09:03:49.081Z] 09:03:49     INFO -       4 CPUs
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  GPU: UNKNOWN
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  Crash reason:  SIGSEGV /SEGV_MAPERR
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  Crash address: 0x0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  Process uptime: not available
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  Thread 11 (crashed)
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   0  libxul.so!nsFocusManager::GetActiveWindow(mozIDOMWindowProxy**) [nsFocusManager.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 362 + 0x29]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rax = 0x00007c947e3e85a2   rdx = 0x0000000000000001
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rcx = 0x00007c9480df4bb8   rbx = 0x00007c9498f73060
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rsi = 0x00007c94816f85c0   rdi = 0x00007c94816f8310
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8610   rsp = 0x00007c94816f8600
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -       r8 = 0x0000000000000b10    r9 = 0x00007c94816fb450
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      r10 = 0x00007c9477a86076   r11 = 0x0000000000000000
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      r12 = 0x00007c9498f73060   r13 = 0x0000000000000003
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      r14 = 0x00007c94816f86f8   r15 = 0x0000000000000000
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c9477a86088
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: given as instruction pointer in context
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   1  libxul.so!NS_InvokeByIndex + 0x8e
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8640   rsp = 0x00007c94816f8620
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947628d732
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   2  libxul.so!CallMethodHelper::Call() [XPCWrappedNative.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 1175 + 0x1b]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8680   rsp = 0x00007c94816f8650
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c9476f688d0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   3  libxul.so!XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode) [XPCWrappedNative.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 1141 + 0x8]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f87f0   rsp = 0x00007c94816f8690
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c9476f68632
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   4  libxul.so!XPC_WN_GetterSetter(JSContext*, unsigned int, JS::Value*) [XPCWrappedNativeJSOps.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 987 + 0x8]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8940   rsp = 0x00007c94816f8800
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c9476f6a881
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   5  libxul.so!CallJSNative(JSContext*, bool (*)(JSContext*, unsigned int, JS::Value*), js::CallReason, JS::CallArgs const&) [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 476 + 0x12]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f89d0   rsp = 0x00007c94816f8950
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b685861
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   6  libxul.so!js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 568 + 0x12]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8a80   rsp = 0x00007c94816f89e0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b685207
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   7  libxul.so!js::CallGetter(JSContext*, JS::Handle<JS::Value>, JS::Handle<JS::Value>, JS::MutableHandle<JS::Value>) [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 772 + 0x2b]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8b10   rsp = 0x00007c94816f8a90
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b687566
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   8  libxul.so!bool GetExistingProperty<(js::AllowGC)1>(JSContext*, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<js::Shape*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) [NativeObject.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 2303 + 0x91]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8bb0   rsp = 0x00007c94816f8b20
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b9f051b
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -   9  libxul.so!bool NativeGetPropertyInline<(js::AllowGC)1>(JSContext*, js::MaybeRooted<js::NativeObject*, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::Value, (js::AllowGC)1>::HandleType, js::MaybeRooted<JS::PropertyKey, (js::AllowGC)1>::HandleType, IsNameLookup, js::MaybeRooted<JS::Value, (js::AllowGC)1>::MutableHandleType) [NativeObject.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 2443 + 0x19]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8c70   rsp = 0x00007c94816f8bc0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b9f1416
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  10  libxul.so!js::GetProperty(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, js::PropertyName*, JS::MutableHandle<JS::Value>) [ObjectOperations-inl.h:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 124 + 0x1c]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8ce0   rsp = 0x00007c94816f8c80
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b68c83b
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  11  libxul.so!js::GetProperty(JSContext*, JS::Handle<JS::Value>, JS::Handle<js::PropertyName*>, JS::MutableHandle<JS::Value>) [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 4409 + 0x12]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f8d70   rsp = 0x00007c94816f8cf0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b68bc81
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  12  libxul.so!Interpret(JSContext*, js::RunState&) [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 2706 + 0x424]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f92b0   rsp = 0x00007c94816f8d80
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b677579
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  13  libxul.so!js::RunScript(JSContext*, js::RunState&) [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 448 + 0xb]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f9300   rsp = 0x00007c94816f92c0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b6701dc
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  14  libxul.so!js::InternalCallOrConstruct(JSContext*, JS::CallArgs const&, js::MaybeConstruct, js::CallReason) [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 603 + 0xd]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f93b0   rsp = 0x00007c94816f9310
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b6851b5
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  15  libxul.so!<name omitted> [Interpreter.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 648 + 0xb]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f93d0   rsp = 0x00007c94816f93c0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b686610
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  16  libxul.so!JS_CallFunctionValue(JSContext*, JS::Handle<JSObject*>, JS::Handle<JS::Value>, JS::HandleValueArray const&, JS::MutableHandle<JS::Value>) [jsapi.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 2727 + 0x23]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f9540   rsp = 0x00007c94816f93e0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947b77520a
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  17  libxul.so!nsXPCWrappedJS::CallMethod(unsigned short, nsXPTMethodInfo const*, nsXPTCMiniVariant*) [XPCWrappedJSClass.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 964 + 0x56]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f99a0   rsp = 0x00007c94816f9550
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c9476f60912
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  18  libxul.so!PrepareAndDispatch [xptcstubs_x86_64_linux.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 125 + 0x13]
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f9aa0   rsp = 0x00007c94816f99b0
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rip = 0x00007c947628e615
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -  19  libxul.so!SharedStub + 0x5b
[task 2020-03-20T09:03:49.092Z] 09:03:49     INFO -      rbp = 0x00007c94816f9b20   rsp = 0x00007c94816f9ab0
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c947628d8b7
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  20  libxul.so!nsObserverList::NotifyObservers(nsISupports*, char const*, char16_t const*) [nsObserverList.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 65 + 0xf]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816f9b70   rsp = 0x00007c94816f9b30
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c94761c8a5f
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  21  libxul.so!nsObserverService::NotifyObservers(nsISupports*, char const*, char16_t const*) [nsObserverService.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 292 + 0x15]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816f9c50   rsp = 0x00007c94816f9b80
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c94761cb98e
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  22  libxul.so!mozilla::MediaManager::NotifyRecordingStatusChange(nsPIDOMWindowInner*) [MediaManager.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 2158 + 0x12]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816f9d50   rsp = 0x00007c94816f9c60
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c94793c1d7a
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  23  libxul.so!mozilla::detail::RunnableFunction<mozilla::GetUserMediaWindowListener::NotifyChrome()::$_35>::Run() [nsThreadUtils.h:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 557 + 0x39]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816f9d70   rsp = 0x00007c94816f9d60
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c947940e0ae
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  24  libxul.so!nsThread::ProcessNextEvent(bool, bool*) [nsThread.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 1220 + 0x6]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa2c0   rsp = 0x00007c94816f9d80
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c9476264465
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  25  libxul.so!NS_ProcessNextEvent(nsIThread*, bool) [nsThreadUtils.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 481 + 0xd]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa2f0   rsp = 0x00007c94816fa2d0
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c9476269cbb
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  26  libxul.so!mozilla::ipc::MessagePump::Run(base::MessagePump::Delegate*) [MessagePump.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 87 + 0x7]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa350   rsp = 0x00007c94816fa300
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c94769b6c7b
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  27  libxul.so!MessageLoop::RunInternal() [message_loop.cc:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 315 + 0x14]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa3a0   rsp = 0x00007c94816fa360
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c947694e0a4
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  28  libxul.so!MessageLoop::Run() [message_loop.cc:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 290 + 0x5]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa3d0   rsp = 0x00007c94816fa3b0
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c947694dfbe
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  29  libxul.so!nsBaseAppShell::Run() [nsBaseAppShell.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 137 + 0xd]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa3f0   rsp = 0x00007c94816fa3e0
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c9479f5b769
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  30  libxul.so!XRE_RunAppShell() [nsEmbedFunctions.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 911 + 0x6]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa430   rsp = 0x00007c94816fa400
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c947b505fa4
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  31  libxul.so!mozilla::ipc::MessagePumpForChildProcess::Run(base::MessagePump::Delegate*) [MessagePump.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 237 + 0x5]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa460   rsp = 0x00007c94816fa440
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c94769b7541
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  32  libxul.so!MessageLoop::RunInternal() [message_loop.cc:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 315 + 0x14]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa4b0   rsp = 0x00007c94816fa470
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c947694e0a4
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -  33  libxul.so!MessageLoop::Run() [message_loop.cc:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 290 + 0x5]
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rbp = 0x00007c94816fa4e0   rsp = 0x00007c94816fa4c0
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      rip = 0x00007c947694dfbe
[task 2020-03-20T09:03:49.093Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -  34  libxul.so!XRE_InitChildProcess(int, char**, XREChildData const*) [nsEmbedFunctions.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 742 + 0x8]
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -      rbp = 0x00007c94816fa750   rsp = 0x00007c94816fa4f0
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -      rip = 0x00007c947b505adf
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -  35  libmozglue.so!Java_org_mozilla_gecko_mozglue_GeckoLoader_nativeRun [APKOpen.cpp:e50cbce87f8dcfec4f6e14a080f90d9e06dbe5a7 : 418 + 0x6]
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -      rbp = 0x00007c94816fa7e0   rsp = 0x00007c94816fa760
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -      rip = 0x00007c9480a01bbb
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.094Z] 09:03:49     INFO -  36  base.odex + 0xa8cbf3
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -      rbp = 0x00007c94816fa8b8   rsp = 0x00007c94816fa7f0
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -      rip = 0x00007c9482188bf3
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -  37  0x7c94816fac50
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa8c8
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -      rip = 0x00007c94816fac50
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -      Found by: previous frame's frame pointer
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -  38  dalvik-LinearAlloc (deleted) + 0x6b38
[task 2020-03-20T09:03:49.095Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa8d0
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      rip = 0x00007c949eb34b38
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -  39  base.odex + 0x8860d9
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa8e8
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      rip = 0x00007c9481f820d9
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -  40  libart.so + 0x14546d
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa900
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      rip = 0x00007c949a05146d
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -  41  dalvik-main space (deleted) + 0x7b400
[task 2020-03-20T09:03:49.096Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa918
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      rip = 0x0000000012c7b400
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -  42  base.odex + 0x806644
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa920
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      rip = 0x00007c9481f02644
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -  43  system@framework@boot-framework.art + 0x2deba0
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa950
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      rip = 0x000000007157eba0
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.097Z] 09:03:49     INFO -  44  dalvik-LinearAlloc (deleted) + 0x6b38
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa970
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      rip = 0x00007c949eb34b38
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -  45  base.odex + 0x84f194
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa988
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      rip = 0x00007c9481f4b194
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -  46  libart.so + 0x310b80
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa990
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      rip = 0x00007c949a21cb80
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.098Z] 09:03:49     INFO -  47  boot.oat + 0x263b8
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa998
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      rip = 0x000000007196d3b8
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -  48  libart.so + 0x310b80
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa9a0
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      rip = 0x00007c949a21cb80
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -  49  boot.oat + 0x263b8
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa9a8
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      rip = 0x000000007196d3b8
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.099Z] 09:03:49     INFO -  50  libart.so + 0x310b80
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa9b0
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      rip = 0x00007c949a21cb80
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -  51  libart.so + 0x1ed2ae
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816fa9e0
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      rip = 0x00007c949a0f92ae
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -  52  libart.so + 0x30a402
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816faa40
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      rip = 0x00007c949a216402
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -      Found by: stack scanning
[task 2020-03-20T09:03:49.100Z] 09:03:49     INFO -  53  dalvik-LinearAlloc (deleted) + 0x6b38
[task 2020-03-20T09:03:49.101Z] 09:03:49     INFO -      rbp = 0x00007c94816fac50   rsp = 0x00007c94816faa50
[task 2020-03-20T09:03:49.101Z] 09:03:49     INFO -      rip = 0x00007c949eb34b38
[task 2020-03-20T09:03:49.101Z] 09:03:49     INFO -      Found by: stack scanning
...
Flags: needinfo?(hsivonen)

(In reply to Henri Sivonen (:hsivonen) from comment #15)

which suggests that the getUserMedia implementation internally calls nsIFocusManager::GetActiveWindow outside the parent process.

...on Android only!

In the non-parent-process case, the code wants to use the DOM window to get at a message manager:
https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/mobile/android/modules/geckoview/GeckoViewUtils.jsm#357

The code to do that uses nsIDocShell:
https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/mobile/android/modules/geckoview/GeckoViewUtils.jsm#344

If getUserMedia is invoked from an OOP iframe, it can't get at the message manager of the active window, i.e. of the top-level Web content.

I think this code should actually be looking up the message manager of the process the caller is in.

Flags: needinfo?(hsivonen)

peterv, when GeckoViewUtils realizes that it's not being called in the parent process, how should it discover the right message manager so that the result is the right one both in the process hosting top-level Web content and in OOP iframe?

Flags: needinfo?(peterv)

Nika said on Matrix that GeckoViewUtils probably needs to switch to JSWindowActor.

Flags: needinfo?(peterv)
Pushed by hsivonen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/be3905a69c71 Remove content-process use of nsIFocusManager::GetActiveWindow. r=NeilDeakin
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: