Closed
Bug 470584
Opened 17 years ago
Closed 16 years ago
TM: Function.call() doesn't set "this" correctly
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: jwkbugzilla, Unassigned)
References
()
Details
(Keywords: regression)
An Adblock Plus testcase fails in 20081220 build both in Shiretoko and Minefield, I get "this.regexp is undefined" exception. This is thrown in filterClasses.js line 381 (http://hg.mozdev.org/adblockplus/file/9647dfba2b24/src/chrome/content/filterClasses.js#l381) - this.regexp simply cannot be undefined because it is defined in prototype (and redefined for all instances of the class). Switching off JIT makes the testcase run correctly. Minimal changes to the code (e.g. calling this.regexp.toString() or accessing this.text before that line) also make the testcase run correctly. Given that behavior, I am not quite sure how to minimize the testcase.
| Reporter | ||
Comment 1•17 years ago
|
||
Figured out that "this" isn't pointing to the object here - it is pointing to the serialize() method itself. Caller is this code:
RegExpFilter.prototype.serialize.call(this, buffer);
Verified that "this" is correct in the caller. Using Function.apply() instead of Function.call() doesn't change anything.
Summary: TM: "this.regexp is undefined" for a variable defined in prototype → TM: Function.call() doesn't set "this" correctly
Comment 2•17 years ago
|
||
Wladimir, can you still reproduce this with the latest tracemonkey build?
Comment 3•17 years ago
|
||
This might have been fixed by bug 465214 on tracemonkey (waiting to merge back to mozilla-central).
| Reporter | ||
Comment 4•17 years ago
|
||
Yes, tracemonkey nightly 2008122219 works fine, no more failing testcases.
| Reporter | ||
Comment 5•16 years ago
|
||
WORKSFORME in 20090107 Minefield and Shiretoko builds, probably fixed by bug 465214.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•