Commit Graph

2043 Commits

Author SHA1 Message Date
mccabe%netscape.com
610a029cf5 Fix to 23532. Check validity of JS_ARENA_ALLOCATE call before using it as an argument of memcpy in JS_ArenaGrow.
Thanks to wyeung@real.com for noticing we were being unsafe here and suggesting the fix.
2000-04-21 09:25:43 +00:00
brendan%mozilla.org
27df4eb10b Spruce up a couple of comments. 2000-04-21 01:49:49 +00:00
brendan%mozilla.org
3bdfa83a05 Functions that use unqualified __parent__ or __proto__ must be heavyweight (36625, r=shaver). 2000-04-21 01:47:20 +00:00
rginda%netscape.com
8007074ccd Add nsIScriptError.idl. Build it here rather than back in xpfe/components/console. Checkin by McCabe, on rginda's mac. 2000-04-21 00:57:27 +00:00
rogerl%netscape.com
4683e4c869 oops 2000-04-21 00:46:48 +00:00
rogerl%netscape.com
8c81be5a55 Added labelled statements, fixed some VC++'isms 2000-04-21 00:37:51 +00:00
rginda%netscape.com
6ceaff6eaf icodegenerator.cpp
add m prefix to base and offset label members

interpreter.cpp,h
dual license
wrap interpret in a Context class
add RETURN_VOID case

js2.cpp
update to use context class
remove #if 0 code that'll probably never be used anyway.

jstypes.h
add defineProperty/function to JSObject

vmtypes.h
regerated opcode classes:
  added RETURN_VOID, removed LOAD/SAVE_VAR
  reverted bacl to the smaller print function (thanks to RETURN_VOID)
  fixed branch printing issue
  inherit print() from super if possible

tools/gencode.pl
generate smaller print functions again
don't generate print function if superclass can take care of it.
2000-04-21 00:04:14 +00:00
norris%netscape.com
2c9997aaf4 Clean up new methods. 2000-04-20 23:08:07 +00:00
beard%netscape.com
45f08249f7 Simple dependency tracking with make depend target. 2000-04-20 23:02:19 +00:00
rogerl%netscape.com
d2674e90be Added ASSERT cases to FixNext child handling. 2000-04-20 23:00:37 +00:00
beard%netscape.com
d40f4c7499 Simple dependencies list. Rebuilt with make depend target. 2000-04-20 22:58:23 +00:00
norris%netscape.com
07735d8e89 Fix build error. 2000-04-20 22:36:46 +00:00
norris%netscape.com
721391dfa7 Subject:
contextClassloader problem in ScriptRuntime.java
   Date:
        Tue, 11 Apr 2000 09:45:36 -0400
   From:
        "Howard Lin" <howard@softcom.com>
     To:
        "Norris Boyd" <norris@netscape.com>
    CC:
        "Andrew Wason" <aw@softcom.com>




Hi, Norris, we are trying to create a Java class in JavaScript. When security manager is on, everything works fine. But when security
manager is off, we got an error saying the "... is not defined". The problem is that in ScriptRuntime.java, when security is on,
getContextClassLoader is null due to SecurityException and Class.forName is used to find the class, which works fine. When security
is off, ContextClassLoaderMethod is invoked to find the class. Since we use a separate thread to load third party jar files,
ContextClassLoaderMethod will throw a ClassNotFound exception.

To illustrate this problem, I wrote a simple applet, evaluating a simple js file in its paint method, which is running on a separate thread.
When security is off, I got the following:

ReferenceError: "Global" is not defined.
        at org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:
494)
        at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java, Compile
d Code)
        at org.mozilla.javascript.Interpreter.interpret(Interpreter.java, Compil
ed Code)
        at org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:
67)
        at org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:
54)
        at org.mozilla.javascript.Context.evaluateReader(Context.java:739)
        at test.evaluate(test.java:26)
        at test.paint(test.java:16)
        at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:117)
        at java.awt.Component.dispatchEventImpl(Component.java:2447)
        at java.awt.Container.dispatchEventImpl(Container.java:1035)
        at java.awt.Component.dispatchEvent(Component.java:2307)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:287)
        at java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:10
1)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:92)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:83)

When security is on, it runs fine. Or if the code moved to init method, it works fine regardless of security. We are using JDK 1.2.2.

Howard
2000-04-20 19:53:16 +00:00
jband%netscape.com
dc13704f3f Had the wrong clazz for the root! So it was better when the caching was broken. Now it works on MI objects with caching fixed. My bad copy/paste error from long ago. 2000-04-20 12:16:45 +00:00
jband%netscape.com
41e5c7514e backing out little fix from earlier today because it causes crashes in some MI cases. I'll investigate and do the right fix 2000-04-20 11:06:48 +00:00
brendan%mozilla.org
8dc79066e8 Check access and redeclaration legality when defining a getter/setter (36117, r=norris) 2000-04-20 07:10:14 +00:00
beard%netscape.com
40022cf8f5 removed extraneous semi-colons after namespace declarations. 2000-04-20 06:20:31 +00:00
beard%netscape.com
7279428cf8 warnings: commented out unused parameter name. 2000-04-20 06:19:43 +00:00
jband%netscape.com
a0b141afcc fix typo bug that was causing wrapper cache misses on wrapper around objects implementing multiple interfaces when the first wrapper is made for an interface that is not leftmost 2000-04-20 03:38:47 +00:00
norris%netscape.com
b27bb891d9 Add line number information. 2000-04-19 23:24:04 +00:00
rogerl%netscape.com
07efe443fa Removing variables. 2000-04-19 22:45:57 +00:00
rogerl%netscape.com
f07ec29168 Added hasOwnProperty, propertyIsEnumerable, isPrototypeOf to Object. 2000-04-19 22:32:50 +00:00
rogerl%netscape.com
2beda190e7 Began moving away from variables, fixed compare/branch ordering.
Testcases working.
2000-04-19 02:09:06 +00:00
scc%netscape.com
18ebe287b9 making string conversions explicit 2000-04-18 23:53:10 +00:00
rginda%netscape.com
4308ea7ed1 formatting changes. use only one tab regardless of nested namespaces 2000-04-18 21:51:45 +00:00
norris%netscape.com
d23d359cba Add missing method for 1.4R3 compatibility. 2000-04-18 16:53:28 +00:00
norris%netscape.com
564f1dca5b Fix bug where a bean property can conflict with a method name. 2000-04-18 16:52:00 +00:00
norris%netscape.com
3ef540f70d Fix bug:
var a = Math.abs;
  a(-245);

  gets the following error :

  org.mozilla.javascript.EvaluatorException: Method "abs" called on
  incompatible object.
2000-04-18 16:34:36 +00:00
rginda%netscape.com
6d135f273c removed superfluous ;s after namespace decs. 2000-04-18 07:14:49 +00:00
rginda%netscape.com
12509b464c regenerated opcode classes after grncode.pl changes 2000-04-18 07:06:25 +00:00
rginda%netscape.com
ad7e72b179 modified to print R~ if NotARegister 2000-04-18 07:04:24 +00:00
dp%netscape.com
fb1a037854 Implemented component unregister. 2000-04-18 05:26:40 +00:00
mccabe%netscape.com
9908d528c7 added files: mozilla/js/src/xpconnect/src/nsScriptError.cpp 2000-04-18 02:35:06 +00:00
mccabe%netscape.com
369030f2b6 Move nsIConsoleService and implementation into xpcom/base, and nsIScriptError and implementation into js/src/xpconnect. (A place for JavaScript-specific XPCOM would be better, but xpconnect will do). 2000-04-18 02:34:54 +00:00
rogerl%netscape.com
ef88b04ba2 added '(' for RegisterList output 2000-04-18 01:46:32 +00:00
rginda%netscape.com
c156b65e07 regenerated opcodenames to include padding, added label printing back into icg::print 2000-04-18 01:31:24 +00:00
rginda%netscape.com
a74abe59c8 space out opcodenames array 2000-04-18 01:19:12 +00:00
beard%netscape.com
f51bb4d1d9 std::pair 2000-04-18 00:52:07 +00:00
beard%netscape.com
cbc85867b4 moved initConsole() out to :: namespace. 2000-04-18 00:51:53 +00:00
beard%netscape.com
a45402c371 added vmtypes.h,.cpp 2000-04-18 00:50:58 +00:00
rogerl%netscape.com
f14edea523 added vmtypes/jstypes 2000-04-18 00:46:18 +00:00
rogerl%netscape.com
8812cb41bd Fixed WINDOZE build issues 2000-04-18 00:38:26 +00:00
rginda%netscape.com
0d5e50344a initial add of perl script to generate icode classes 2000-04-18 00:22:51 +00:00
rginda%netscape.com
17ec7b0f1a removing bogus file 2000-04-18 00:20:10 +00:00
rginda%netscape.com
501e880dcc adding files for namespace change 2000-04-18 00:19:09 +00:00
rginda%netscape.com
f8d4b9c989 added js::VM, ICG, JSTypes, and Interpreter namespaces; messed around with lots of code.
Created class for each ICode, adding a print() method (using formatters)
2000-04-18 00:17:34 +00:00
beard%netscape.com
8cdd6bce1b FASTLOCK changes. 2000-04-17 23:58:28 +00:00
braddr%puremagic.com
3d8106eb54 Implicit types are evil. Add PRUint32.
r=mccabe
2000-04-16 00:21:07 +00:00
jband%netscape.com
d946b71592 add a test with an 'out' array of strings 2000-04-15 18:44:22 +00:00
mccabe%netscape.com
149b12786e Print error diagnostics to stderr even when non-debug, to support those folks
that want to debug with the -console flag.
2000-04-15 06:59:21 +00:00