Граф коммитов

2046 Коммитов

Автор SHA1 Сообщение Дата
jband%netscape.com 04051a0da0 belt and suspenders check of WITH_SERVICE results 2000-04-23 23:04:40 +00:00
jband%netscape.com c9fbfe6b3f fix a dangerous looking (but harmless) warning on Mac opt 2000-04-22 01:06:42 +00:00
rogerl%netscape.com f516a5722d Added a beginning for exception handling. 2000-04-21 22:52:52 +00:00
mccabe%netscape.com b83e22e2ea 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 c4dc0a590b Spruce up a couple of comments. 2000-04-21 01:49:49 +00:00
brendan%mozilla.org c65d2d6a93 Functions that use unqualified __parent__ or __proto__ must be heavyweight (36625, r=shaver). 2000-04-21 01:47:20 +00:00
rginda%netscape.com d6c8ec2a89 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 ca67259713 oops 2000-04-21 00:46:48 +00:00
rogerl%netscape.com 5e238bd7a5 Added labelled statements, fixed some VC++'isms 2000-04-21 00:37:51 +00:00
rginda%netscape.com 7615ee9226 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 0bca489fe4 Clean up new methods. 2000-04-20 23:08:07 +00:00
beard%netscape.com d7ad5021eb Simple dependency tracking with make depend target. 2000-04-20 23:02:19 +00:00
rogerl%netscape.com 215b1e19c7 Added ASSERT cases to FixNext child handling. 2000-04-20 23:00:37 +00:00
beard%netscape.com 30971c4c45 Simple dependencies list. Rebuilt with make depend target. 2000-04-20 22:58:23 +00:00
norris%netscape.com 35a0af1014 Fix build error. 2000-04-20 22:36:46 +00:00
norris%netscape.com e8b7e89546 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 9b08d1ac85 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 9c1badb1ca 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 3d6de092fd Check access and redeclaration legality when defining a getter/setter (36117, r=norris) 2000-04-20 07:10:14 +00:00
beard%netscape.com 9acaa398fe removed extraneous semi-colons after namespace declarations. 2000-04-20 06:20:31 +00:00
beard%netscape.com bb0348e64d warnings: commented out unused parameter name. 2000-04-20 06:19:43 +00:00
jband%netscape.com d727af1bbe 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 62efd62f19 Add line number information. 2000-04-19 23:24:04 +00:00
rogerl%netscape.com 5199f6e49c Removing variables. 2000-04-19 22:45:57 +00:00
rogerl%netscape.com 772eb43e2e Added hasOwnProperty, propertyIsEnumerable, isPrototypeOf to Object. 2000-04-19 22:32:50 +00:00
rogerl%netscape.com 7b7fc3829f Began moving away from variables, fixed compare/branch ordering.
Testcases working.
2000-04-19 02:09:06 +00:00
scc%netscape.com 995abb7f46 making string conversions explicit 2000-04-18 23:53:10 +00:00
rginda%netscape.com 3a06b96f97 formatting changes. use only one tab regardless of nested namespaces 2000-04-18 21:51:45 +00:00
norris%netscape.com 5b52db907b Add missing method for 1.4R3 compatibility. 2000-04-18 16:53:28 +00:00
norris%netscape.com 1931f31f5b Fix bug where a bean property can conflict with a method name. 2000-04-18 16:52:00 +00:00
norris%netscape.com f10587a521 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 1952e14ff8 removed superfluous ;s after namespace decs. 2000-04-18 07:14:49 +00:00
rginda%netscape.com 531ede4f17 regenerated opcode classes after grncode.pl changes 2000-04-18 07:06:25 +00:00
rginda%netscape.com 33d0848741 modified to print R~ if NotARegister 2000-04-18 07:04:24 +00:00
dp%netscape.com 366ecea0fc Implemented component unregister. 2000-04-18 05:26:40 +00:00
mccabe%netscape.com 4c637c806e added files: mozilla/js/src/xpconnect/src/nsScriptError.cpp 2000-04-18 02:35:06 +00:00
mccabe%netscape.com b93c689e66 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 fce9fa62b1 added '(' for RegisterList output 2000-04-18 01:46:32 +00:00
rginda%netscape.com 8ac24b9045 regenerated opcodenames to include padding, added label printing back into icg::print 2000-04-18 01:31:24 +00:00
rginda%netscape.com b0eca07a47 space out opcodenames array 2000-04-18 01:19:12 +00:00
beard%netscape.com 52d7e01394 std::pair 2000-04-18 00:52:07 +00:00
beard%netscape.com 7add6915a1 moved initConsole() out to :: namespace. 2000-04-18 00:51:53 +00:00
beard%netscape.com c18125076f added vmtypes.h,.cpp 2000-04-18 00:50:58 +00:00
rogerl%netscape.com f163805c99 added vmtypes/jstypes 2000-04-18 00:46:18 +00:00
rogerl%netscape.com 0e17feea55 Fixed WINDOZE build issues 2000-04-18 00:38:26 +00:00
rginda%netscape.com 73017de6a1 initial add of perl script to generate icode classes 2000-04-18 00:22:51 +00:00
rginda%netscape.com 5a6fd84159 removing bogus file 2000-04-18 00:20:10 +00:00
rginda%netscape.com 0fac613959 adding files for namespace change 2000-04-18 00:19:09 +00:00
rginda%netscape.com 66cb26879d 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 02798c9177 FASTLOCK changes. 2000-04-17 23:58:28 +00:00