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

36158 Коммитов

Автор SHA1 Сообщение Дата
norris%netscape.com 7c5ca20070 Fix problem found by Andrew Wason <aw@softcom.com>:
Subject:
        null arguments
   Date:
        Wed, 04 Aug 1999 13:22:35 -0400
   From:
        Andrew Wason <aw@softcom.com>
     To:
        norris@netscape.com
    CC:
        Howard Lin <howard@softcom.com>




When I try to pass a null argument to an interface implemented in JS, I get:

js: Cannot convert null to an object.
js: uncaught JavaScript exception:
org.mozilla.javascript.EvaluatorException: Cannot convert null to an object.


var b = new Packages.javax.swing.border.Border() {
        getBorderInsets : function(c) {
                return new Insets(0,0,0,0);
        }
};
b.getBorderInsets(null);


Here is the stack trace where the exception is happening:

java.lang.reflect.InvocationTargetException:
org.mozilla.javascript.EvaluatorException: Cannot convert null to an object.
         at
org.mozilla.javascript.tools.ToolErrorReporter.runtimeError(ToolErrorReporte
r.java:106)
         at org.mozilla.javascript.Context.reportRuntimeError(Context.java:484)
         at org.mozilla.javascript.Context.reportRuntimeError(Context.java:500)
         at
org.mozilla.javascript.ScriptRuntime.toObject(ScriptRuntime.java:529)
         at org.mozilla.javascript.Context.toObject(Context.java:1107)
         at adapter0.getBorderInsets(<adapter>)
         at java.lang.reflect.Method.invoke(Native Method)
         at
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java,
Compiled Code)
         at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1256)
         at org.mozilla.javascript.Interpreter.interpret(Interpreter.java,
Compiled Code)
         at
org.mozilla.javascript.InterpretedScript.call(InterpretedScript.java:49)
         at
org.mozilla.javascript.InterpretedScript.exec(InterpretedScript.java:37)
         at org.mozilla.javascript.Context.evaluateReader(Context.java:691)
         at
org.mozilla.javascript.tools.shell.Main.processSource(Main.java, Compiled Code)
         at org.mozilla.javascript.tools.shell.Main.main(Main.java:146)


Context.toObject does not allow wrapping nulls.
JavaAdapter.generateOverride should generate bytecode to check if an
argument is null and if it is not call Context.toObject.

I'll take a look at fixing this after the other JavaAdapter patches get
checked in so we don't get out of sync.

Andrew
--
Andrew Wason
SoftCom, Inc.
aw@softcom.com
1999-08-04 23:14:57 +00:00
slamm%netscape.com a587a0acf6 Fix bug #9925: Down arrow behaves incorrectly. 1999-08-04 23:10:56 +00:00
robinf%netscape.com 1b62c159f9 *** empty log message *** 1999-08-04 23:05:21 +00:00
radha%netscape.com de9e5e65d0 Don't load a page thro' necko when going to a anchor with in the same page or going
back from an anchor to the top of the page. Modify
EqualBaseURL() so that it will do the right thing.
1999-08-04 22:46:49 +00:00
radha%netscape.com ffa156c692 Pass url load type LOAD_HISTORY when loading a url due to a back or forward button click 1999-08-04 22:44:59 +00:00
radha%netscape.com 434b77186d Add a new loading type LOAD_HISTORY 1999-08-04 22:44:13 +00:00
rogerl%netscape.com 729d969253 The lastIndex property is defined to be an integer which we're allowed to
keep as 32 bits, so the tests for 33 bits were too demanding.
1999-08-04 22:27:31 +00:00
rogerl%netscape.com c93ef4e649 Missing '\' before \n. Trailing '|' in expected output was not correct. 1999-08-04 22:26:07 +00:00
rogerl%netscape.com 1355cfb383 Was using 'g' flag instead of 'm' and wasn't really testing the multiline
functionality (assuming I interpreted the intent correctly).
1999-08-04 22:24:57 +00:00
hoa.nguyen%intel.com daab979848 Build bustage. 1999-08-04 22:10:54 +00:00
valeski%netscape.com 5703191006 we're now returning load url error codes out 1999-08-04 21:45:06 +00:00
nhotta%netscape.com 08f17cf263 Added progid/cid to idl and interface change. 1999-08-04 21:36:36 +00:00
hyatt%netscape.com 4011d8a754 Fixing three problems that prevented XP menus from working with RDF templates.
The Bookmarks menu and mail menus should work now.
1999-08-04 21:36:30 +00:00
hoa.nguyen%intel.com 3b2bc0b413 Added nsJSHTMLEmbedElement.cpp. 1999-08-04 21:33:30 +00:00
hoa.nguyen%intel.com 1aedc68df0 DOM Element for JavaScript access of embed tags. 1999-08-04 21:31:34 +00:00
mscott%netscape.com fc725eefbf bulletproof some NS_RELEASE's with NS_IF_RELEASE. 1999-08-04 21:23:26 +00:00
hangas%netscape.com b0517ec8bb Cleanup toolbar buttons. Hook?=slamm,spitzer 1999-08-04 21:21:52 +00:00
hangas%netscape.com f096176e6d Moving tree styles around such that mailnews uses xul.css for tree style and xul.css has correct colors on tree headers. Hook?=slamm, sspitzer 1999-08-04 21:21:18 +00:00
valeski%netscape.com 67e54f0298 nsNetModRegEntry.cpp - fixed mem leak. nsStdURL.cpp - fixed port parsing bug 1999-08-04 21:20:48 +00:00
robinf%netscape.com 74da185d02 *** empty log message *** 1999-08-04 21:20:47 +00:00
valeski%netscape.com 4eff26f005 we now handle the URL attribute in a http-equiv refresh tag 1999-08-04 21:19:22 +00:00
valeski%netscape.com 2336127fd1 added new url munging code. we now take a swing at the urlbar string w/ the uri parsing code first, then fallback to munging if we have to 1999-08-04 21:18:24 +00:00
slamm%netscape.com 0f3965610f Remove OpenBookmarkURL() call from Bookmarks menu (it's already on the individual items). 1999-08-04 21:10:47 +00:00
robinf%netscape.com 6430a7cb3c *** empty log message *** 1999-08-04 21:04:23 +00:00
sspitzer%netscape.com 89ce44307b fix mac build bustage for mscott. 1999-08-04 20:57:40 +00:00
rogerl%netscape.com 1eb9c2aa52 New version for linux/sparc. Changed source file names for Sun Workshop and
GCC builds.
1999-08-04 20:50:01 +00:00
rogerl%netscape.com d9d532ff9a Added Linux/sparc rules. Added rules to distinguish Sun Workshop and GCC
builds.
1999-08-04 20:48:18 +00:00
rogerl%netscape.com d47169e539 Added Linux/sparc component 1999-08-04 20:46:58 +00:00
buster%netscape.com fc5f6f418f added GetCaretEnabled
cleaned up caret APIs according to coding convention
1999-08-04 20:46:16 +00:00
robinf%netscape.com 10b25f4844 *** empty log message *** 1999-08-04 20:45:14 +00:00
slamm%netscape.com 54d4412df6 Remove default pref for open/close so that individual sidebars can set it the way they want. 1999-08-04 20:43:03 +00:00
sspitzer%netscape.com 61b623fe09 fix warning 1999-08-04 20:40:57 +00:00
sspitzer%netscape.com 19d5cfb592 fix warnings. add newline to the end of file for crappy unix compilers 1999-08-04 20:40:23 +00:00
slamm%netscape.com 6b8334378b Bring customize dialog closer to spec. Workaround tree datasource bug #11258 (use resource URL for now). 1999-08-04 20:40:21 +00:00
slamm%netscape.com 64bfcd65d0 Remove entry for unused and non-existant gif, online.gif. 1999-08-04 20:37:51 +00:00
slamm%netscape.com fee5accc45 Use window.open instead of toolkit core to open bookmarks window. (workaround fix for bug #9972) 1999-08-04 20:36:42 +00:00
mscott%netscape.com 6f65a4af55 Fix linux warning. 1999-08-04 20:35:58 +00:00
mscott%netscape.com f244479644 fix linux warning. 1999-08-04 20:32:33 +00:00
mscott%netscape.com 45e1ec4323 fix linux warning 1999-08-04 20:32:11 +00:00
matt%netscape.com 4e04281319 taking out pref dump 1999-08-04 20:30:43 +00:00
mscott%netscape.com f45a9a4241 Add nsIMsgMailNewsUrl.idl and remove nsIMsgMailNewsUrl.h 1999-08-04 20:29:45 +00:00
mscott%netscape.com c06c9f4f77 SetErrorMessage takes a const char *, stub out Set/GetErrorMessage
add accessors for nsIMsgStatusFeedback.
1999-08-04 20:29:22 +00:00
mscott%netscape.com 91ddf1ddf4 remove nsIMsgMailNewsUrl.h and add nsIMsgMailNewsUrl.idl 1999-08-04 20:28:47 +00:00
bienvenu%netscape.com dde24d143b add imap msgs, not part of build yet 1999-08-04 20:21:13 +00:00
rhp%netscape.com 4cd2be5eb4 Changes for quoting cleanup in mail compose 1999-08-04 20:19:45 +00:00
mscott%netscape.com 109e725621 Not part of the build yet!! I converted nsIMsgMailNewsUrl.h into an idl file. 1999-08-04 20:17:40 +00:00
pinkerton%netscape.com c888de1a4c removing the TOOLBAR_DD #ifdef's. 1999-08-04 20:16:31 +00:00
pinkerton%netscape.com 33f8f58cdc using the region pool stuff so we're not constantly creating/destroying regions in the smooth scrolling code. Also use a stackbased helper to simplify error handling. 1999-08-04 20:15:44 +00:00
pinkerton%netscape.com 609dd4a696 exporting the region pool stuff so it can be accessed from Widget. 1999-08-04 20:14:54 +00:00
sspitzer%netscape.com cbac9c703b make the background on this image transparent, so it looks better when selected. thanks for Andrew Niese <icos@arez.com> for fixing the image. 1999-08-04 20:14:10 +00:00