3873 Commits

Author SHA1 Message Date
brendan%mozilla.org
fa065f1652 Better fix than 0.9.6 minimal fix for NUL-termination assumption in replace (108832, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@108625 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 21:26:33 +00:00
brendan%mozilla.org
989357e2ad Don't warn or 'correct' = to == in a condition unless the right operand has greater precedence than == (106244, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@108556 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 05:20:57 +00:00
rginda%netscape.com
db9ee285d0 bug 110903, patch=brendan, sr=shaver, r=me
Call new script hook for scripts created via xdr.


git-svn-id: svn://10.0.0.236/trunk@108541 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 02:47:41 +00:00
brendan%mozilla.org
93edeeffb3 Don't ass-u-me fp->argv => fp->fun (109635, sr=shaver/jband).
git-svn-id: svn://10.0.0.236/trunk@108539 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-20 02:37:01 +00:00
timeless%mac.com
7b921259da Bugzilla Bug 110080 change !NS_SUCCEEDED(status) to NS_FAILED(status)
s/!NS_SUCCEEDED/NS_FAILED/g;s/!NS_FAILED/NS_SUCCEEDED/g;
r=dougt sr=hewitt


git-svn-id: svn://10.0.0.236/trunk@108471 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-19 06:45:00 +00:00
pschwartau%netscape.com
53f933a408 Initial add. Regression test for bug 110286.
git-svn-id: svn://10.0.0.236/trunk@108345 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-17 03:20:45 +00:00
brendan%mozilla.org
056cf28a63 Remove __call__ and add a callback used to check f.caller access for any function object f (109113, r=jst, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@108257 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-16 02:56:49 +00:00
alecf%netscape.com
0c847ee212 win32 REQUIRES cleanup
git-svn-id: svn://10.0.0.236/trunk@108139 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-15 03:49:13 +00:00
seawood%netscape.com
54111460c9 Build libmozjs during the install phase.
Bug #104307 sr=jband


git-svn-id: svn://10.0.0.236/trunk@108015 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 04:52:55 +00:00
bzbarsky%mit.edu
068756d821 Use NS_LITERAL_STRING instead of NS_ConvertASCIItoUCS2 where possible
(i.e. where the string is a literal).  Bug 104159, r=jag, sr=alecf


git-svn-id: svn://10.0.0.236/trunk@107987 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-14 01:33:42 +00:00
pschwartau%netscape.com
f0a1c21adf Adding another case to test.
git-svn-id: svn://10.0.0.236/trunk@107966 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-13 19:46:27 +00:00
brendan%mozilla.org
589201c307 Avoid ClaimScope (lock-free to -full transition) in JS_GetClass and js_FinalizeObject called from the GC (109183, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@107900 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-11 21:25:13 +00:00
jband%netscape.com
37eba2b798 not part of build. Now that null DOM strings are correctly supported we can fix the test case
git-svn-id: svn://10.0.0.236/trunk@107854 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-10 22:35:26 +00:00
pschwartau%netscape.com
388f6c3fbb Fixing a typo.
git-svn-id: svn://10.0.0.236/trunk@107813 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-10 02:47:52 +00:00
pschwartau%netscape.com
df7a557ec3 Adding another case to test.
git-svn-id: svn://10.0.0.236/trunk@107812 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-10 02:46:24 +00:00
brendan%mozilla.org
57a2bb6907 For now (0.9.6), str_replace requires an independent replacement string (108832, r=shaver, sr=jband, a=asa).
git-svn-id: svn://10.0.0.236/trunk@107705 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-08 23:53:33 +00:00
pschwartau%netscape.com
47b893d895 Initial add. Regression test for bug 108440.
git-svn-id: svn://10.0.0.236/trunk@107626 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 23:20:48 +00:00
nboyd%atg.com
9e9cb2fc7c Patch from Igor:
I suggest to move the code in ScriptableObject.get/put that deals with getter/setter
into separated methods so it would be easy to follow the code and the attached patch
does just that.


git-svn-id: svn://10.0.0.236/trunk@107603 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 14:15:48 +00:00
brendan%mozilla.org
4566fb535b Fix Function.call(this, 'alert(42)')() so the anonymous function finds its nearest scripted caller's principals (90546, sr=shaver&jband).
git-svn-id: svn://10.0.0.236/trunk@107586 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:34:04 +00:00
dbaron%fas.harvard.edu
13b5500ba3 Ensure that string literals are used as |const char*| rather than |char*|. r=jag sr=brendan b=107052
git-svn-id: svn://10.0.0.236/trunk@107583 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 06:24:10 +00:00
mkaply%us.ibm.com
7bdb802715 #105476
r=os2team, sr=brendan@mozilla.org
Add ASM implementation of js_CompareAndSwap for OS/2 VACPP


git-svn-id: svn://10.0.0.236/trunk@107572 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 05:20:33 +00:00
dbaron%fas.harvard.edu
52bea38360 Add assertions that users of nsDependentC?String meet the requirements of nsAFlatC?String. Add nsDependentSingleFragmentC?Substring for users that don't. Additional cleanup after bug 100214. b=104651 r=jag sr=scc
git-svn-id: svn://10.0.0.236/trunk@107556 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 04:12:20 +00:00
brendan%mozilla.org
c1526a5251 Avoid recursive join/toString death (108440, r=shaver, sr=jband).
git-svn-id: svn://10.0.0.236/trunk@107522 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:15:44 +00:00
brendan%mozilla.org
d97c123a81 Move the oversized arena back-pointer to a well-aligned header extension lying just behind a->base (108013, sr=waterson&jband).
git-svn-id: svn://10.0.0.236/trunk@107517 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-07 00:11:22 +00:00
jband%netscape.com
9501633b32 better error message when zero passed where object or null expected. bug 108284. r=dbradley sr=shaver. Also, fix uninitilized counter var in debug only code rs=jband
git-svn-id: svn://10.0.0.236/trunk@107364 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-06 00:40:54 +00:00
rginda%netscape.com
e94dc5a898 removing dead code, see mozilla/js2
git-svn-id: svn://10.0.0.236/trunk@107357 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 21:46:17 +00:00
rginda%netscape.com
b217ed22ea removing dead code, see mozilla/js2
git-svn-id: svn://10.0.0.236/trunk@107355 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-05 21:38:18 +00:00
seawood%netscape.com
76780820f4 Backing out fix for remote mach-o builds as it left mach-o builds fragile.
Add TK_CFLAGS back to default CFLAGS/CXXFLAGS.
Bug #107696


git-svn-id: svn://10.0.0.236/trunk@107199 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 03:29:05 +00:00
rginda%netscape.com
db72e1cb29 bug 108257, "source notes broken for functions compiled via JS_CompileUCFunctionForPrincipals", sr=brendan, r=shaver
no need to emit the function body after calling FunctionBody


git-svn-id: svn://10.0.0.236/trunk@107131 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-03 00:10:47 +00:00
peterv%netscape.com
625023cc1d Add build option for the JS profiler on Mac. a=dbradley. Not part of the build.
git-svn-id: svn://10.0.0.236/trunk@107098 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 10:27:52 +00:00
pschwartau%netscape.com
8bb6615f5a Improving readability.
git-svn-id: svn://10.0.0.236/trunk@107042 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:17:57 +00:00
pschwartau%netscape.com
2e2a0c6b28 Initial add. Regression test for bug 107771.
git-svn-id: svn://10.0.0.236/trunk@107040 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-02 02:06:54 +00:00
dbradley%netscape.com
636bf8b5b0 Bug 83426 - Remove DOM exception hack. r=jst, r=dbradley, sr=jband
git-svn-id: svn://10.0.0.236/trunk@106972 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 15:52:53 +00:00
jband%netscape.com
3b3d9f5aaf fixing warnings from recent landing and uncommenting test cases I did not mean to comment out for the checkin
git-svn-id: svn://10.0.0.236/trunk@106926 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 05:18:35 +00:00
brendan%mozilla.org
bd7ff6eb3b Fix nul-termination assumption hidden in lastIndexOf, broken by dependent strings fix for bug 56940 (107771, r=jag, sr=waterson).
git-svn-id: svn://10.0.0.236/trunk@106916 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 03:19:54 +00:00
jband%netscape.com
958b4e78e0 fix Mac bustage. I can't believe the Mac can't do this conversion without a cast!
git-svn-id: svn://10.0.0.236/trunk@106914 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 02:36:19 +00:00
jband%netscape.com
1c7f2a930e the HP compiler says that anonymous unions can't even have structs. So the union must be named. Fixing that bustage
git-svn-id: svn://10.0.0.236/trunk@106909 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 01:45:48 +00:00
jband%netscape.com
4246348236 fix Mac bustage (I hope). I think these names conflicted with other names
git-svn-id: svn://10.0.0.236/trunk@106908 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 01:15:53 +00:00
seawood%netscape.com
acaf3004b5 Since '-framework Carbon' causes binaries to require console access to run, do not link using that flag by default. Otherwise, remote builds & non-console tinderboxes will break. Mac OSX Mach-O only.
Bug #107696 r=mozbot


git-svn-id: svn://10.0.0.236/trunk@106904 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:54:48 +00:00
pete%alphanumerica.com
3c4492f3e0 b=107823, r=ccarlen, sr=brendan
--pete


git-svn-id: svn://10.0.0.236/trunk@106886 18797224-902f-48f8-a5cc-f745e15eee43
2001-11-01 00:11:15 +00:00
jband%netscape.com
e9cb6fa375 added files: mozilla/js/src/xpconnect/src/xpcvariant.cpp
git-svn-id: svn://10.0.0.236/trunk@106869 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:36:34 +00:00
jband%netscape.com
57fc23094c add support for nsIVariant and nsIPropertyBag. bug 44675 and bug 98209. sr=vidur r=dbradley
git-svn-id: svn://10.0.0.236/trunk@106867 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:35:07 +00:00
rginda%netscape.com
4e00b5d217 bug 99601, don't install xpconnect debugger keyword handler if one is already there, r=jband, sr=brendan
git-svn-id: svn://10.0.0.236/trunk@106854 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 23:13:17 +00:00
brendan%mozilla.org
7c84ad604a Don't try to correct = to == if strict, do it only if downrev (106244, r=jband, sr=shaver).
git-svn-id: svn://10.0.0.236/trunk@106796 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 03:17:00 +00:00
pschwartau%netscape.com
974182fbf4 Initial add. Regression test for bug 94257.
git-svn-id: svn://10.0.0.236/trunk@106785 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-31 02:32:38 +00:00
nboyd%atg.com
8f7d722e97 Fix bug with test case:
var testArray = new Array(6);
testArray[1+1]+=2;


git-svn-id: svn://10.0.0.236/trunk@106691 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 14:06:58 +00:00
nboyd%atg.com
8d20f58b4f Hello Norris
The following test case case leads to a compilation error in Rhino. In this
script alert is an user defined
function in the global object and it shows the value of the specified
parameter in a popup window. Save the script as a html file and run it under
Netscape and IE. The output via their JS engines is that alert(1)
executes but the execution of line fails as blks variable is undefined. The
Fix bug:

Rhino engine fails at compilation time itself and cannot excute the script.
It doesn't like the syntax of line.


Steven


/// ****************  test case **************    ///
<script>
alert(1);
  blks[ 10 << 2 ] |= true;
  alert(2);
</script>


/// **********************  Error Message ************************** ////
evaluating script: null
java.lang.NullPointerException
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICode(Compiled Code)
  at org.mozilla.javascript.Interpreter.generateICodeFromTree(Compiled Code)
  at
org.mozilla.javascript.Interpreter.generateScriptICode(Interpreter.java)
  at org.mozilla.javascript.Interpreter.compile(Interpreter.java)
  at org.mozilla.javascript.Context.compile(Context.java)
  at org.mozilla.javascript.Context.compile(Context.java)


git-svn-id: svn://10.0.0.236/trunk@106690 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 13:55:26 +00:00
rginda%netscape.com
9dffd404bd bug 99601, add filter support to js/jsd, r=jband sr=brendan
large addition to the jsd_xpc component allows arbitrary filtering of debug hooks by url pattern, line range, and global object.  also adds ability to begin instrumenting jsscripts at app startup.


git-svn-id: svn://10.0.0.236/trunk@106689 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 13:41:32 +00:00
nboyd%atg.com
487a8a8072 Patch from Igor:
I must admit this is very subtitle, but still...

Here are the lines from
    public void defineProperty(String propertyName, Object delegateTo,
                               Method getter, Method setter, int attributes)


        GetterSlot slot = (GetterSlot)getSlotToSet(propertyName,
                                                   propertyName.hashCode(),
                                                   true);
        slot.delegateTo = delegateTo;
        slot.getter = getter;
        slot.setter = setter;
        slot.setterReturnsValue = setter != null && setter.getReturnType() != Void.TYPE;
        slot.value = null;
        slot.attributes = (short) attributes;
        slot.flags = (byte)flags;

Now suppose that after the new slot is added, another thread is accessing it. Then it would see not yet ready slot with all nasty consequences! For example,  SMP computer can re-arrange writes so the new value of slot.flags would be visible before slot.getter then another thread would generate null pointer exception.

race2_fix.diff fixes that by using the explicit Slot argument to addSlot instead of boolean flag so the new slot can be fully initialized and then inserted under synchronization to the table. I also call addSlot directly because it is supposed to be used with not-yet existed properties and split addSlot to addSlot and addSlotImpl so in case of table growth there is no need to re-enter already synchronized monitor.

This changes also allows to explicitly throw RuntimeException if defineProperty is called for the property that is already exists instead of either throwing cast exception in "GetterSlot slot = (GetterSlot)getSlotToSet(propertyName," or worth yet re-initializing already existed slot.

Regards, Igor


git-svn-id: svn://10.0.0.236/trunk@106688 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 13:07:00 +00:00
nboyd%atg.com
8d0d15ef9e Print either line or file name if either is present.
git-svn-id: svn://10.0.0.236/trunk@106687 18797224-902f-48f8-a5cc-f745e15eee43
2001-10-30 12:59:30 +00:00