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

36 Коммитов

Автор SHA1 Сообщение Дата
jst%netscape.com 059979d5e5 Eliminating the last traces of NS_COMFALSE from the DOM code, fixes M15 bug #11594. 2000-04-05 02:40:08 +00:00
hyatt%netscape.com ca3c35c57d Enhancements to nsIScriptcontext. r=brendan@mozilla.org 2000-03-29 01:18:21 +00:00
akkana%netscape.com 1b96eaa6ca 9266: Disable JS in the editor (and allow for disabling it anywhere). r=brendan,jband,norris,sfraser 2000-03-28 00:15:56 +00:00
norris%netscape.com 4eb52aa84b Fix
32088 Circumventing Same Origin security policy using javascript: URLs
        32040 about: can't be link
Also remove deprecated method
r=mstoltz
2000-03-24 22:15:37 +00:00
brendan%mozilla.org cfe8cb3e89 (bug 22795, r=vidur@netscape.com)
- Add "aShared" flag to nsIScriptContext::CompileEventHandler, telling it to clear the compiled event handler's scope chain if true, in order to
  (a) avoid entraining garbage
      (i.e., a shared compile-time-only parent object); and
  (b) cause later BindCompiledEventHandler calls to ensure that the event handler has the particular scope chain needed for the binding
      (to the target object that's receiving the event).
- Use :: consistently (and all over the place) before calls to JS_ functions in nsJSEnvironment.cpp.
- Eliminate tabs and barbarians-at-the-gate-of-Rome style, in favor of when-in-Rome style (hail Waterson Maximus!)
2000-01-08 00:24:24 +00:00
brendan%mozilla.org 5135a6dbb2 - Rename "FunctionObject" or shorthands to "EventHandler" to make nsIScriptContext more scripting-language-neutral.
- Allow nsIScriptContext::BindEventHandler to take a null void* handler argument, to remove the binding by nullifying it (for hyatt's XML-driven-key-mapping work). 
- Try to GetCompiledEventHandler (and if we don't, and compile it, Put too) for the load event and other non-deferred (XUL window-level) event listeners. 
- Improve doc comments and whitespace.
1999-12-07 22:14:17 +00:00
waterson%netscape.com ec2655c506 Bug 20786. Use function object, rather than function, as the thing which is executed, ensuring that the correct bindings are used when the function is shared across several contexts. This checkin is really brendan@mozilla.org; I'm just landing the code. 1999-12-05 07:29:25 +00:00
brendan%mozilla.org d44c35ee1b - Doc-comments for nsIScriptContext methods I added or modified.
- Rename nsIScriptContext::CompileFunction to CompileEventHandler, and add BindCompiledEventHandler, to reflect function name restrictions and help brutal sharing.
- Add adjunct-interface nsIScriptEventHandlerOwner to nsIScriptObjectOwner.h; this interface is queried for by nsEventListenerManger.cpp to test and fill the XUL prototype event handler "cache".
- PR_LOG JS warnings, and look in javascript.options.{strict,werror} for those options.  
- Implement nsIScriptEventHandlerOwner in nsXULElement, keeping pointers to pre-compiled event handlers in nsXULPrototypeAttribute.
 
(bug 13218, r=waterson@netscape.com,vidur@netscape.com)
1999-12-03 03:40:30 +00:00
brendan%mozilla.org 90c5c9c53e XULDOMJS_19991106_BRANCH landing (15146, r=vidur@netscape.com) 1999-11-12 06:08:14 +00:00
dmose%mozilla.org 5312eacf8c updated license boilerplate to xPL 1.1, a=chofmann@netscape.com,r=endico@mozilla.org 1999-11-06 03:40:37 +00:00
brendan%mozilla.org f81d5969c6 (13163, r=alecf, scc, waterson, others; names available on request)
- Fix most of bug 13163 (see TODO for rest).  This entails adding a version-string argument to nsIScriptContext::EvaluateString and passing it around lots of places in content sinks. 

- Fix leaks and confusion about mSecurityManager and mNameSpaceManager in nsJSEnvironment.cpp.  These still need to move from nsJSContext to nsGlobalWindow or thereabouts, jband and vidur are looking at that. 

- Added comments and expanded tabs in nsJSEnvironment.cpp, esp. to EvaluateString.  Also changed various nsresult vars to be named rv.  Also restored brace/style conformity to nsJSProtocolHandler.cpp. 

- Factored CompileFunction from AddScriptEventListener to pave the way for brutal sharing of compiled JS event handlers via JS_CloneFunctionObject. 

- Lots of nsCOMPtr uses added.  I'm using one for mNameSpaceManager.  Hold mSecurityManager as a service explicitly, on the other hand (awaiting scc's fix to allow comptrs for services), and release in nsJSContext's dtor (fixing a leak).  These two managers should be moved to the window object -- TODO item below. 

- Hold JSRuntimeService along with JSRuntime for live of nsJSEnvironment, fix for shaver. 

- Fix window.setTimeout etc. so the filename and line number of the timeout expr is propagated.  This meant factoring nsJSUtils.cpp code. 

- Fix all content sinks to use the same, and up-to-date JavaScript version parsing (whether for script type or for old language attribute); also fix SplitMimeType clones to strip whitespace. 

- With waterson, fix bug in brutal-sharing version of XUL content sink: script src= should not evaluate the inline content of its tag.
1999-10-31 00:43:30 +00:00
vidur%netscape.com 8cd8f396d0 Added a version of window.close, which when alled from script that defers actual closure if it is invoked from the script context of the window itself. Fixes bug 15261. R=joki. 1999-10-28 14:12:56 +00:00
norris%netscape.com c99b609910 Add ability to disable JS. Fix 13978 shopping at webvan.com crashes 1999-09-17 20:13:52 +00:00
norris%netscape.com 9acf604770 Add security support for javascript: uris. 1999-09-15 20:58:41 +00:00
vidur%netscape.com cb561f35bc Added JS exceptions to DOM glue. Added implementation for nsIDOMDOMException. Added nsIScriptContextOwner::ReportScriptError. 1999-09-08 23:14:30 +00:00
arielb%netscape.com 1b252b2e3b includes updates to codbase matching security checks currently turned off
but in place.  redefined the script security manager in caps and it is
now generating codebase principals.
1999-08-20 09:51:02 +00:00
vidur%netscape.com 43c7cb9748 Changed method signature of EvaluateScript to return nsresult. Added nsJSThreadContextStack pushing and popping around script evaluation. 1999-08-19 20:36:31 +00:00
vidur%netscape.com e6f812551a changed name of NS_CreateContext to NS_CreateScriptContext 1999-08-09 19:14:49 +00:00
norris%netscape.com 06317a54b3 Tom Pixley's code for the beginnings of DOM security, with a fix for the previous Mac link failure. 1999-07-07 07:50:03 +00:00
michaelp%netscape.com aa887814b4 added memory cleanup tripwire. 1999-03-12 22:24:30 +00:00
scc%netscape.com 2ec0a397ea rename |IID()| --> |GetIID()| 1999-03-03 19:48:57 +00:00
pinkerton%netscape.com 4e9693cba4 add IID 1999-02-04 18:29:36 +00:00
vidur%netscape.com c534e7ce68 Fixed early initialization problem in script namespace management 1998-12-30 02:46:36 +00:00
vidur%netscape.com a0bb847d23 Ongoing work on mechanism for introducing global names into a script namespace 1998-12-21 16:51:10 +00:00
vidur%netscape.com fd093d0d82 Enabled asynchronous loading of SCRIPT SRC=, STYLE SRC= and LINK elements for style sheets. Changed nsIScriptContext to not be dependent on JavaScript. 1998-12-15 06:10:59 +00:00
joki%netscape.com ec365a7a8c Adding initial bit for the JS security system 1998-11-21 00:12:33 +00:00
vidur%netscape.com 1b135ae3ec Added GC method to script contenxt 1998-10-26 23:22:21 +00:00
joki%netscape.com c08549fd99 Adding new window methods, moving js evaluate methods to using UC strings. 1998-10-01 22:21:59 +00:00
vidur%netscape.com 5bb6715b57 Added javascript: URL handling. Added AddNamedReference and RemovedNamedReference to script context interface. 1998-08-20 22:25:21 +00:00
joki%netscape.com c316d58438 Adding url and lineno to script evaluation 1998-08-12 23:37:50 +00:00
joki%netscape.com edb8b34146 Adding partial load event support, removing script context Run_GC method adding partial script error support 1998-08-12 04:56:40 +00:00
joki%netscape.com 1f008faf7e Add RunGC method onto ScriptContext interface. Probably temporary until we have auto-gc'ing set up. 1998-08-10 01:33:34 +00:00
vidur 1900060e23 Moved over to a new version of Level 1. NodeIterators and AttributeLists out. NodeLists and NamedNodeMaps in. 1998-07-14 18:44:44 +00:00
vidur b5f413930d Added autogeneration of XPCOM headers and JavaScript stub classes. Added better masking of JS-specific structures in generic interfaces. Creation of a scripting global object interface. 1998-06-23 18:43:06 +00:00
dario 21730dc654 doc 1998-04-15 18:55:21 +00:00
kipp 098bef52b4 moved to pub 1998-04-13 20:24:54 +00:00