Read-only Git mirror of the Mercurial gecko repositories at https://hg.mozilla.org. How to contribute: https://firefox-source-docs.mozilla.org/contributing/contribution_quickref.html
Go to file
nboyd%atg.com 61f8164eba Fix following bug:
Subject:
             Re: Rhino: [[DefaultValue]] missing for Call object
 Resent-Date:
             Mon, 2 Jul 2001 08:52:07 -0700 (PDT)
 Resent-From:
             mozilla-jseng@mozilla.org
        Date:
             Mon, 02 Jul 2001 11:49:59 -0400
        From:
             Norris Boyd <nboyd@atg.com>
 Organization:
             Art Technology Group
          To:
             Christopher Oliver <coliver@mminternet.com>
         CC:
             mozilla-jseng@mozilla.org
  References:
             1




I believe the correct result of the script should be

[object global]
[object Object]
[object global]

The activation object (which goes by the name of "Call" for historical
reasons) should never be the 'this' value in a function call. See "10.1.6
Activation Object" in the ECMA spec.

I'll look at fixing the problem for Rhino. If there's agreement on my
analysis, someone should fix this for Spidermonkey too.

--N

Christopher Oliver wrote:

> Hi,
>
> function a() {
>     function b() {
>          print(this);
>     }
>     this.f = function() {
>          print(this);
>          b();
>     }
>     b();
> }
>
> var a = new a();
> a.f();
>
> Running the above script with SpiderMonkey produces:
>
> [object global]
> [object Object]
> [object Call]
>
> Running with Rhino produces the following exception:
>
> uncaught JavaScript exception: undefined: Cannot find default value for
> object. (line 3)
>
> This is due to a bug in org.mozilla.javascript.NativeCall which doesn't
> implement toString or valueOf or override getDefaultValue.
> However, even after I hacked in an implementation of getDefaultValue in
> NativeCall, Rhino still produces a different result then spidermonkey:
>
> [object Call]
> [object Object]
> [object Call]
2001-07-03 02:19:51 +00:00
accessible Correct fix for OS/2 bustage that doesn't bloat libaccessibility.so. rules.mk has special rules to transform EXTRA_DSO_LIBS for OS/2, so use it. (discussed with mkaply) 2001-07-01 04:41:38 +00:00
apache/gzip/src
build ftp.netscape.com seems happy again. Add it back to bloaturls.txt 2001-07-03 01:27:37 +00:00
calendar
caps Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
cck Fix for Bug 88131: path of animated gif is truncated (r=bobj) 2001-06-29 17:38:47 +00:00
chrome Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
cmd
config #88742 2001-07-02 03:49:50 +00:00
content History should use outliner, provide a way to sort/view history the old way, win32 classic should use +/- twisties (73857, 71947, 80846, also fixes 66907, 59814, 71029, 48864, 69260, others). r=alecf sr=ben 2001-07-03 01:46:22 +00:00
db Land STATIC_BUILD_20010612_BRANCH, which supports building mozilla with components statically linked into the executable, as well as 'meta modules' that combine components into uber-DLLs. 2001-06-20 20:21:49 +00:00
dbm Remove unnecessary OS/2 specific code 2001-07-02 23:41:02 +00:00
directory Bug 77672, fix nsLDAPConnection leaking objects and threads. Patch=leif, 2001-06-22 01:09:20 +00:00
docshell Fix for bugzilla bug 86330 r=adamock sr=rpotts. Bug with SH in frames with targets 2001-07-03 00:00:12 +00:00
dom Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
editor Fix wording of dialog shown when you edit a frameset or iframe page in composer. r=brade, sr=blake. 2001-07-03 01:05:22 +00:00
ef
embedding bug #80146. make gtk tooltips in the embedding widget look nicer. patch from <timecop@network.email.ne.jp>. r=tor,sr=blizzard 2001-07-02 21:41:28 +00:00
expat
extensions And now for a real code change. Fix for bug 88901 (Ill formed code in MozillDocument.cpp in Document::createAttributeNS). r=sicking, sr=scc. 2001-07-03 00:49:46 +00:00
gc/boehm
gconfig
gfx No bug - OS/2 only - Banding across images 2001-07-02 13:22:54 +00:00
gfx2 Removes console output in opt builds from gfx, gfx2, gtk. 2001-06-22 01:35:39 +00:00
grendel Checking in Brian Duff's ui mods (looks great!). --talisman 2001-06-23 19:23:33 +00:00
htmlparser Landing static build changes for OS2 2001-07-01 12:11:13 +00:00
include
intl Re-doing GetUnicode() -> get() change inadvertently undone after merge-conflict. 2001-07-03 01:28:13 +00:00
java *not part of the build* 2001-06-29 08:08:59 +00:00
jpeg Land STATIC_BUILD_20010612_BRANCH, which supports building mozilla with components statically linked into the executable, as well as 'meta modules' that combine components into uber-DLLs. 2001-06-20 20:21:49 +00:00
js Fix following bug: 2001-07-03 02:19:51 +00:00
js2 Changed instanceof to is and removed no-line-break constraint after use 2001-06-30 02:29:52 +00:00
l10n
layout Relying on cached text length too heavily upon retrieval (87348, needed for 37587). r=smfr sr=kin 2001-07-03 01:09:58 +00:00
lib [Not part of build] Added __read_console()/__write_console(), which are the default I/O vectors for the stdin/stdout/stderr. This lets selective I/O redirection work on Mac OS X. 2001-06-27 23:46:15 +00:00
mailnews More IRIX bustage 2001-07-03 02:19:04 +00:00
modules Patch to fix crash with sample plugin and OS X plugins bug 85334 r=av sr=attinasi 2001-07-03 01:56:28 +00:00
mozilla
msgsdk
mstone
netwerk bug #87534. multipart/mixed handler doesn't parse content-type handler properly. r=dougt, sr=darin 2001-07-02 19:35:48 +00:00
network/protocol/http
nsprpub Bugzilla bug 88535: backed out some of the changes made in the previous 2001-07-01 18:02:46 +00:00
nunet
parser Landing static build changes for OS2 2001-07-01 12:11:13 +00:00
plugin/oji/MRJ
privacy
profile Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
rdf Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
README
security removing, should be a dead file 2001-07-03 00:57:45 +00:00
silentdl
string Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
suite
sun-java
themes History should use outliner, provide a way to sort/view history the old way, win32 classic should use +/- twisties (73857, 71947, 80846, also fixes 66907, 59814, 71029, 48864, 69260, others). r=alecf sr=ben 2001-07-03 01:46:22 +00:00
timer
tools Bug 87215. Make jprof work right with the static build. r=cls, sr=leaf 2001-06-29 22:45:45 +00:00
tripledb
uriloader Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
view Enable interrupting of parsing to improve performance during long document loads + include dynamic switching between user-responsiveness and page load performance,bug 76722 sr=attinasi@netscape.com, r=harishd@netscape.com. 2001-06-29 04:01:26 +00:00
wallet
webshell Bug 88413: Remove |GetUnicode()| from nsString (and replace it with |get()|). r=dbaron, rs=scc. 2001-06-30 11:02:25 +00:00
webtools Add strikethrough to resolved bug numbers. Bug 79816. r=jake. 2001-07-01 20:17:28 +00:00
widget Bug 87991: checking in for ftang: 2001-07-03 00:21:56 +00:00
xpcom #88742 2001-07-02 03:49:50 +00:00
xpfc
xpfe Removing line that snuck in. 2001-07-03 01:52:11 +00:00
xpinstall fixing bug 88880 - Launching Setup via a CD autorun causes dll error. r=sgehani sr=syd. affects only windows platforms 2001-07-02 20:34:10 +00:00
.cvsignore
aclocal.m4
allmakefiles.sh Bug 87215. Make jprof work right with the static build. r=cls, sr=leaf 2001-06-29 22:45:45 +00:00
client.mak committing the placeholder for NSS_CO_TAG so we don't forget to pull it. 2001-06-27 03:52:58 +00:00
client.mk Removing makefile.win until cvs server is upgraded 2001-06-20 20:24:22 +00:00
configure Automated update 2001-07-02 03:59:21 +00:00
configure.in #88742 2001-07-02 03:49:50 +00:00
embed.mak
embed.mk
LEGAL
LICENSE
Makefile.in Removing unused/terminally broken configure options: 2001-07-01 09:46:46 +00:00
makefile.win Land STATIC_BUILD_20010612_BRANCH, which supports building mozilla with components statically linked into the executable, as well as 'meta modules' that combine components into uber-DLLs. 2001-06-20 20:21:49 +00:00
mozilla.kdevprj
mozilla.lsm
nglayout.mac
nglayout.mk
trex.mak
trex.mk