sometimes __noSuchMethod__ is not found out and throw Exception: func is not a function

RESOLVED FIXED in mozilla12

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: teramako, Assigned: bhackett)

Tracking

({regression})

12 Branch
mozilla12
x86
Windows XP
regression
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

6 years ago
Created attachment 587655 [details]
__noSuchMethod__test.xpi (BootstrappedExtension)

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0a1) Gecko/20120110 Firefox/12.0a1
Build ID: 20120110031111

Steps to reproduce:

main code is here:

var a = {
    __noSuchMethod__: function () {c++;}
};
var e = [];
var c = 0;
for (var i = 0; i < 100; i++) {
    try {
        a.b();
    } catch (ex) {
        e.push([i, ex.message]);
    }
}

e.push(c);
Services.console.logStringMessage(JSON.stringify(e));


1. install the attempted xpi
2. disable and enable the extension (I don't know why the problem is not occured at the first installed)




Actual results:

following messages are shown in Error Console

Test: start
[[39,"a.b is not a function"],[80,"a.b is not a function"],[81,"a.b is not a function"],97]


Expected results:

messages should be shown any times:

Test: start
[100]
(Reporter)

Comment 1

6 years ago
This problem is occured since Firefox 12.0a1 (2012-01-10)

Comment 2

6 years ago
Regression window(m-c)
Works:
http://hg.mozilla.org/mozilla-central/rev/9a230265bad5
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0a1) Gecko/20120108 Firefox/12.0a1 ID:20120108060523
Fails:
http://hg.mozilla.org/mozilla-central/rev/c713003d3226
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0a1) Gecko/20120110 Firefox/12.0a1 ID:20120110031111
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=9a230265bad5&tochange=c713003d3226



Regression window(m-i)
Works:
http://hg.mozilla.org/integration/mozilla-inbound/rev/b6c60a28454d
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0a1) Gecko/20120107 Firefox/12.0a1 ID:20120109062923
Fails:
http://hg.mozilla.org/integration/mozilla-inbound/rev/7ab4f1ebc7cc
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0a1) Gecko/20120109 Firefox/12.0a1 ID:20120109063028
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=b6c60a28454d&tochange=7ab4f1ebc7cc

Triggered by:
7ab4f1ebc7cc	Brian Hackett — Backout 54cd89b0f1fa (bug 712714 backout). Talos will probably report fake regressions for this patch, do not back out for this reason.
Blocks: 712714
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
(Assignee)

Comment 3

6 years ago
Created attachment 587878 [details] [diff] [review]
patch

I didn't confirm this fixes the example, but when generating an IC for the CALLPROP the access was treated as a generic property access and didn't go through the logic used for noSuchMethod.  The patch has a shell testcase which exhibited the bad behavior.
Assignee: general → bhackett1024
Attachment #587878 - Flags: review?(dvander)
Attachment #587878 - Flags: review?(dvander) → review+
(Assignee)

Updated

6 years ago
Blocks: 717319
(Assignee)

Comment 4

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/16f0d80b3137
Is it at all plausible that this patch would have improved the Talos V8 numbers?  The regression bot claims it did...
(Assignee)

Comment 6

6 years ago
(In reply to Boris Zbarsky (:bz) from comment #5)
> Is it at all plausible that this patch would have improved the Talos V8
> numbers?  The regression bot claims it did...

Not legitimately, in the same way that bug 712714 didn't actually regress V8 either.  At least things are back in balance I guess.
https://hg.mozilla.org/mozilla-central/rev/16f0d80b3137
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Depends on: 721939
You need to log in before you can comment on or make changes to this bug.