[JavaScript Error: "invalid 'in' operand aLivemarkInfo"] when calling method: [mozIAsyncLivemarks::getLivemark]

RESOLVED FIXED in Firefox 40

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: ginnchen+exoracle, Assigned: ginnchen+exoracle)

Tracking

Trunk
mozilla40
Other
Solaris
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox40 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

7.26 KB, patch
bholley
: review+
stevensn
: feedback+
Details | Diff | Splinter Review
Assignee

Description

4 years ago
This bug is only on SPARC 32bit (and PowerPC 32bit etc.)

Create some bookmarks and folders under bookmarks menu.
Click "Show your bookmarks" button, the created bookmarks are not shown, and found following error in browser console:

NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "invalid 'in' operand aLivemarkInfo" {file: "resource://gre/components/nsLivemarkService.js" line: 379}]'[JavaScript Error: "invalid 'in' operand aLivemarkInfo" {file: "resource://gre/components/nsLivemarkService.js" line: 379}]' when calling method: [mozIAsyncLivemarks::getLivemark]


This bug appears since Firefox 29.


This is caused by the incomplete fix of Bug 961488.
See Bug 961488 comment 78.

We changed js/xpconnect/src/XPCWrappedJSClass.cpp, so that we can pass JSVAL to C++ native function, but we didn't fix it for Javascript function.

I found we should fix the problem in Stub, so that both C++ native function and Javascript function can get JSVAL correctly.
Assignee

Comment 1

4 years ago
Posted patch 1153707.diff (obsolete) — Splinter Review
Landry, would you please try this on ppc32?

Thanks!
Attachment #8591455 - Flags: feedback?(landry)
I'll try, but right now build on OpenBSD is broken for various other reasons... maybe try steve ?
Flags: needinfo?(steve)
Yeah, even with a big pile of patches (#1151370, #1150659, #1151829 and the one from this bug), i cant build m-c on ppc:

In file included from /home/landry/src/mozilla-central/image/src/Downscaler.cpp:12:0,
     from /usr/obj/m-c/image/src/Unified_cpp_image_src0.cpp:29:
/home/landry/src/mozilla-central/gfx/2d/image_operations.h:32:26: fatal error: skia/SkTypes.h: No such file or directory

I dont remember if patches from https://bugzilla.mozilla.org/show_bug.cgi?id=1144632 is supposed to fix it or other skia work was pending for ppc, too many things broken on exotic archs now :(

cc'ing martin since he has sparc knowledge too...
This patch causes a build failure on ppc32

xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_linux.cpp:133:41: error: invalid type argument of unary \u2018*\u2019 (have \u2018uint32_t {aka unsigned int}\u2019)
                 dp->val.p = *((void**) *tempu32);


To get skia building I still have my patch from 1005535 applied.
Flags: needinfo?(steve)
Comment on attachment 8591455 [details] [diff] [review]
1153707.diff

With your diff (and a bunch of other openbsd-related patches to get m-c building) my build fails :

270:28.65 /home/landry/src/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_openbsd.cpp:100:40: warning: 'tempu32' may be used uninitialized in this function [-Wmaybe-uninitialized]
270:28.65                  *d++          = tempu32;
270:28.66                                         ^
270:28.93 xptcstubs_ppc_openbsd.o
270:31.56 /home/landry/src/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_openbsd.cpp: In function 'nsresult PrepareAndDispatch(nsXPTCStubBase*, uint32_t, uint32_t*, uint32_t*, double*)':
270:31.56 /home/landry/src/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_openbsd.cpp:114:41: error: invalid type argument of unary '*' (have 'uint32_t {aka unsigned int}')
270:31.56                  dp->val.p = *((void**) *tempu32);
270:31.57                                          ^
270:31.57 /home/landry/src/mozilla-central/xpcom/reflect/xptcall/md/unix/xptcstubs_ppc_openbsd.cpp:116:38: error: invalid type argument of unary '*' (have 'uint32_t {aka unsigned int}')
270:31.57                  dp->val.p = (void*) *tempu32;
Attachment #8591455 - Flags: feedback?(landry) → feedback-
Sorry, posted my comment without seeing steve's first - was redundant :) To workaround skia failures i used attachment 8579319 [details] [diff] [review].
Assignee

Comment 7

4 years ago
I think it should be

dp->val.p = (void*) tempu32;

and

dp->val.p = *((void**) tempu32);


Sorry for me mistake.
Assignee

Comment 8

4 years ago
Posted patch patchSplinter Review
Attachment #8591455 - Attachment is obsolete: true
Attachment #8592152 - Flags: feedback?(landry)
Comment on attachment 8592152 [details] [diff] [review]
patch

Sorry, i give up, tried several patchsets and i still get a build failure on skia on powerpc. transferring to steve...
Attachment #8592152 - Flags: feedback?(landry) → feedback?(steve)
And ftr, here's the error, using --disable-skia.


In file included from /home/landry/src/mozilla-central/image/src/Downscaler.cpp:12:0,
                  from /usr/obj/m-c/image/src/Unified_cpp_image_src0.cpp:29:
/home/landry/src/mozilla-central/gfx/2d/image_operations.h:32:26: fatal error: skia/SkTypes.h: No such file or directory
#include "skia/SkTypes.h"
Comment on attachment 8592152 [details] [diff] [review]
patch

Attachment #8592152 [details] [diff] builds on ppc32 and the bookmarks/folders I create through the bookmark menu show up on the bookmark buttons
Attachment #8592152 - Flags: feedback?(steve) → feedback+
Landry, if I build with --disable-skia I get the same error. It looks like Bug 1141642
If I have some time I can look at that in a few days.
Assignee

Updated

4 years ago
Attachment #8592152 - Flags: review?(bobbyholley)
Comment on attachment 8592152 [details] [diff] [review]
patch

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

Looks like this patch doesn't affect tier-1 platforms. rs=me
Attachment #8592152 - Flags: review?(bobbyholley) → review+
https://hg.mozilla.org/mozilla-central/rev/ab87611d012e
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.