Closed Bug 861912 Opened 7 years ago Closed 7 years ago

GC: Remove use of AUTO_MARK_JSVAL in XPConnect

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

Attached patch Proposed changesSplinter Review
The AUTO_MARK_JSVAL macro and the class XPCMarkableJSVal don't serve any purpose when we have a conservative stack scanner, and when we move to exact rooting the RootedValue class will perform this function.

These can therefore be removed.
Attachment #737525 - Flags: review?(bobbyholley+bmo)
Comment on attachment 737525 [details] [diff] [review]
Proposed changes

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

r=bholley

::: js/xpconnect/src/XPCWrappedJSClass.cpp
@@ +712,5 @@
>      }
>  
>      // check if the JSObject claims to implement this interface
> +    RootedObject jsobj(ccx, CallQueryInterfaceOnJSObject(ccx, self->GetJSObject(),
> +                                                             aIID));

nit: indentation
Attachment #737525 - Flags: review?(bobbyholley+bmo) → review+
Backed out for OSX (at least for now) debug mochitest b-c crashes.
https://hg.mozilla.org/integration/mozilla-inbound/rev/712e8ba8219b

https://tbpl.mozilla.org/php/getParsedLog.php?id=21863401&tree=Mozilla-Inbound

08:25:45     INFO -  TEST-INFO | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js | Console message: LOG addons.xpi: Download started for http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi to file /Users/cltbld/Library/Caches/TemporaryItems/tmp-knn.xpi
08:25:45     INFO -  TEST-INFO | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js | Console message: LOG addons.xpi: Download of http://example.com/browser/toolkit/mozapps/extensions/test/xpinstall/unsigned.xpi completed.
08:25:45     INFO -  ************************************************************
08:25:45     INFO -  * Call to xpconnect wrapped JSObject produced this error:  *
08:25:45     INFO -  [Exception... "'[JavaScript Error: "can't access dead object" {file: "resource://gre/components/amWebInstallListener.js" line: 179}]' when calling method: [nsIDOMWindow::document]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/components/amWebInstallListener.js :: Installer_checkAllDownloaded :: line 179"  data: yes]
08:25:45     INFO -  ************************************************************
08:25:45     INFO -  ************************************************************
08:25:45     INFO -  * Call to xpconnect wrapped JSObject produced this error:  *
08:25:45     INFO -  [Exception... "'[JavaScript Error: "can't access dead object" {file: "resource://gre/components/amWebInstallListener.js" line: 179}]' when calling method: [nsIDOMWindow::document]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/components/amWebInstallListener.js :: Installer_checkAllDownloaded :: line 179"  data: yes]
08:25:45     INFO -  ************************************************************
08:25:45     INFO -  ************************************************************
08:25:45     INFO -  * Call to xpconnect wrapped JSObject produced this error:  *
08:25:45     INFO -  [Exception... "'[JavaScript Error: "can't access dead object" {file: "resource://gre/components/amWebInstallListener.js" line: 179}]' when calling method: [nsIDOMWindow::fullScreen]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: resource://gre/components/amWebInstallListener.js :: Installer_checkAllDownloaded :: line 179"  data: yes]
08:25:45     INFO -  ************************************************************
08:25:45     INFO -  Assertion failure: (ptrBits & 0x7) == 0, at ../../../dist/include/js/Value.h:703
08:25:45  WARNING -  TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js | Exited with code 1 during test run
08:25:45     INFO -  INFO | automation.py | Application ran for: 1:03:15.635086
08:25:45     INFO -  INFO | zombiecheck | Reading PID log: /var/folders/lr/nwz2bgs53v1_nr5s75sk7lqh00000w/T/tmpqv3fmApidlog
08:25:57  WARNING -  PROCESS-CRASH | chrome://mochitests/content/browser/toolkit/mozapps/extensions/test/xpinstall/browser_navigateaway2.js | application crashed [@ JS::Value::toObject() const]
08:25:57     INFO -  Crash dump filename: /var/folders/lr/nwz2bgs53v1_nr5s75sk7lqh00000w/T/tmpUF7g6u/minidumps/99AEBA5B-1423-4918-A36F-7DB987EF96B1.dmp
08:25:57     INFO -  Operating system: Mac OS X
08:25:57     INFO -                    10.8.0 12A269
08:25:57     INFO -  CPU: amd64
08:25:57     INFO -       family 6 model 42 stepping 7
08:25:57     INFO -       8 CPUs
08:25:57     INFO -  Crash reason:  EXC_BAD_ACCESS / KERN_INVALID_ADDRESS
08:25:57     INFO -  Crash address: 0x0
08:25:57     INFO -  Thread 0 (crashed)
08:25:57     INFO -   0  XUL!JS::Value::toObject() const [Value.h:76f7d7963692 : 1069 + 0x0]
08:25:57     INFO -      rbx = 0x00007fff71ce2c68   r12 = 0x0000000000000000
08:25:57     INFO -      r13 = 0x00007fff5fbf7c98   r14 = 0x0000000105335d60
08:25:57     INFO -      r15 = 0x00000001078db3d0   rip = 0x000000010169975c
08:25:57     INFO -      rsp = 0x00007fff5fbf7900   rbp = 0x00007fff5fbf7910
08:25:57     INFO -      Found by: given as instruction pointer in context
08:25:57     INFO -   1  XUL!nsXPCWrappedJSClass::CallMethod(nsXPCWrappedJS*, unsigned short, XPTMethodDescriptor const*, nsXPTCMiniVariant*) [Value.h:76f7d7963692 : 1186 + 0x4]
08:25:57     INFO -      rip = 0x000000010210265e   rsp = 0x00007fff5fbf7920
08:25:57     INFO -      rbp = 0x00007fff5fbf7f50
08:25:57     INFO -      Found by: stack scanning
08:25:57     INFO -   2  XUL!JS_SetPendingException(JSContext*, JS::Value) [jsapi.cpp:76f7d7963692 : 6978 + 0x4]
08:25:57     INFO -      rip = 0x00000001031fd9d3   rsp = 0x00007fff5fbf7950
08:25:57     INFO -      rbp = 0x00007fff5fbf7f50
08:25:57     INFO -      Found by: stack scanning
Depends on: 864748
https://hg.mozilla.org/mozilla-central/rev/233f42abf005
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.