1 2006-08-24 Nikolas Zimmermann <zimmermann@kde.org>
3 Reviewed, tweaked and landed by ap
5 http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
6 WebKit should have Qt platform support (Part II)
8 * CMakeLists.txt: Adjust to Anders' build fixes.
9 * wtf/Platform.h: Fix define for the Qt platform (we don't use/need Cairo.)
11 2006-08-23 David Hyatt <hyatt@apple.com>
13 Fix Platform.h to include #defines for graphics features.
17 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
20 2006-08-23 Anders Carlsson <acarlsson@apple.com>
24 Make the bindings compile without CoreFoundation.
26 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
27 * bindings/c/c_instance.cpp:
28 * bindings/c/c_utility.cpp:
29 (KJS::Bindings::convertUTF8ToUTF16):
31 * bindings/runtime.cpp:
32 (KJS::Bindings::Instance::createBindingForLanguageInstance):
33 (KJS::Bindings::Instance::createLanguageInstanceForValue):
34 * bindings/runtime_root.cpp:
35 * bindings/runtime_root.h:
36 * kjs/interpreter.cpp:
37 (KJS::Interpreter::createLanguageInstanceForValue):
40 2006-08-22 Anders Carlsson <acarlsson@apple.com>
44 Move the npruntime code over to using HashMap and the runtime_root code over to using
45 HashMap and HashCountedSet.
47 * bindings/NP_jsobject.cpp:
48 * bindings/c/c_utility.cpp:
49 (KJS::Bindings::identifierFromNPIdentifier):
50 * bindings/c/c_utility.h:
51 * bindings/jni/jni_jsobject.cpp:
52 (JavaJSObject::invoke):
53 * bindings/npruntime.cpp:
54 (getStringIdentifierMap):
55 (getIntIdentifierMap):
56 (_NPN_GetStringIdentifier):
57 (_NPN_GetIntIdentifier):
58 * bindings/runtime_root.cpp:
59 (getReferencesByRootMap):
61 (KJS::Bindings::findReferenceSet):
62 (KJS::Bindings::rootForImp):
63 (KJS::Bindings::rootForInterpreter):
64 (KJS::Bindings::addNativeReference):
65 (KJS::Bindings::removeNativeReference):
66 (RootObject::removeAllNativeReferences):
67 * bindings/runtime_root.h:
69 2006-08-22 Anders Carlsson <acarlsson@apple.com>
73 Switch over the NPAPI and Java bindings to using HashMaps instead of dictionaries.
75 * JavaScriptCore.xcodeproj/project.pbxproj:
76 * bindings/c/c_class.cpp:
77 (KJS::Bindings::CClass::CClass):
78 (KJS::Bindings::CClass::~CClass):
79 (KJS::Bindings::CClass::classForIsA):
80 (KJS::Bindings::CClass::methodsNamed):
81 (KJS::Bindings::CClass::fieldNamed):
82 * bindings/c/c_class.h:
83 * bindings/jni/jni_class.cpp:
84 (JavaClass::JavaClass):
85 (JavaClass::~JavaClass):
86 (JavaClass::methodsNamed):
87 (JavaClass::fieldNamed):
88 * bindings/jni/jni_class.h:
89 * bindings/objc/objc_class.h:
90 * bindings/objc/objc_class.mm:
91 (KJS::Bindings::deleteMethod):
92 (KJS::Bindings::deleteField):
94 (KJS::Bindings::ObjcClass::methodsNamed):
95 (KJS::Bindings::ObjcClass::fieldNamed):
96 * bindings/runtime.cpp:
98 * bindings/runtime_object.cpp:
99 (RuntimeObjectImp::fieldGetter):
100 (RuntimeObjectImp::getOwnPropertySlot):
101 (RuntimeObjectImp::put):
102 (RuntimeObjectImp::canPut):
104 2006-08-21 Vladimir Olexa <vladimir.olexa@gmail.com>
108 http://bugzilla.opendarwin.org/show_bug.cgi?id=6252
109 JavaScript 1.6 Array.lastIndexOf
111 Test: fast/js/array-lastIndexOf.html
113 * kjs/array_object.cpp:
114 (ArrayProtoFunc::callAsFunction): Added a LastIndexOf case.
115 * kjs/array_object.h:
116 (KJS::ArrayProtoFunc::): Added LastIndexOf to enum.
117 * tests/mozilla/expected.html: Two more tests now pass.
119 2006-08-20 Nikolas Zimmermann <zimmermann@kde.org>
121 Reviewed by Maciej. Landed by rwlbuis.
123 Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10463
124 WebKit should have Qt platform support
126 Removing obsolete QConstString/QString constructors in kjs code.
131 2006-08-17 Nikolas Zimmermann <zimmermann@kde.org>
133 Reviewed by Maciej. Landed by rwlbuis.
135 Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10463
136 WTF Changes needed for Qt platform code.
139 * wtf/unicode/UnicodeDecomposition.h: Added.
141 * wtf/unicode/UnicodeDirection.h: Added.
143 * wtf/unicode/qt4/UnicodeQt4.cpp: Added.
144 (WTF::Unicode::direction):
145 (WTF::Unicode::category):
146 (WTF::Unicode::decomposition):
147 * wtf/unicode/qt4/UnicodeQt4.h:
148 (WTF::Unicode::toLower):
149 (WTF::Unicode::toUpper):
150 (WTF::Unicode::isPrintableChar):
151 (WTF::Unicode::isSpace):
152 (WTF::Unicode::isPunct):
153 (WTF::Unicode::isDigit):
154 (WTF::Unicode::mirroredChar):
155 (WTF::Unicode::compare):
157 2006-08-17 Nikolas Zimmermann <zimmermann@kde.org>
159 Reviewed by Eric. Landed by rwlbuis.
161 Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10464
162 Offer a cmake build system for Qt platform.
164 * CMakeLists.txt: Added.
165 * pcre/CMakeLists.txt: Added.
167 2006-08-17 Anders Carlsson <acarlsson@apple.com>
174 2006-08-15 Steve Falkenburg <sfalken@apple.com>
180 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
183 2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz>
187 Build fix: DWARF and -gfull are incompatible with symbol separation.
189 * JavaScriptCore.xcodeproj/project.pbxproj:
191 2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz>
195 http://bugzilla.opendarwin.org/show_bug.cgi?id=10394
196 Bug 10394: WebKit Release and Production configurations should enable dead code stripping
198 * JavaScriptCore.xcodeproj/project.pbxproj:
200 2006-08-15 Mark Rowe <opendarwin.org@bdash.net.nz>
204 http://bugzilla.opendarwin.org/show_bug.cgi?id=10384
205 Bug 10384: Switch to DWARF for Release configuration
207 * JavaScriptCore.xcodeproj/project.pbxproj:
209 2006-08-13 Maks Orlovich <maksim@kde.org>
211 Reviewed (and tweaked a little) by Maciej.
213 - shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting
214 in a 1.2% speed improvement on JS iBench (and probably overall memory savings).
216 This was done by removing _scope and _internalValue data members
217 from JSObject and moving them only to the subclasses that actually
221 (KJS::JSObject::mark): No need to mark scope or internal value here.
223 (KJS::JSObject::JSObject): Don't initialize them.
224 * kjs/JSWrapperObject.cpp: Added. New base class for object types that
225 wrap primitive values (Number, String, Boolean, Date).
226 (KJS::JSWrapperObject::mark):
227 * kjs/JSWrapperObject.h: Added.
228 (KJS::JSWrapperObject::JSWrapperObject):
229 (KJS::JSWrapperObject::internalValue):
230 (KJS::JSWrapperObject::setInternalValue):
231 * kjs/array_object.cpp:
232 (ArrayPrototype::ArrayPrototype): Don't set useless internal value.
233 * kjs/bool_object.cpp:
234 (BooleanInstance::BooleanInstance): Inherit from JSWrapperObject.
235 (BooleanProtoFunc::callAsFunction): Fixed to account for fact that not all
236 JSObjects have an internal value.
237 (BooleanObjectImp::construct): ditto.
239 * kjs/collector.cpp: Lowered cell size to 48.
240 (KJS::Collector::allocate): meaningless whitespace change
241 * kjs/date_object.cpp:
242 (KJS::DateInstance::DateInstance): Inherit from JSWrapperObject.
243 (KJS::DateProtoFunc::callAsFunction): adjusted for move of internalValue
244 (KJS::DateObjectImp::construct): ditto
246 * kjs/error_object.cpp:
247 (ErrorPrototype::ErrorPrototype): don't set internal value
248 * kjs/function.cpp: move _scope and related handling here
249 (KJS::FunctionImp::mark): mark scope
251 (KJS::FunctionImp::scope): moved here from JSObject
252 (KJS::FunctionImp::setScope): ditto
253 * kjs/number_object.cpp:
254 (NumberInstance::NumberInstance): inherit from JSWrapperObject
255 (NumberProtoFunc::callAsFunction): adjusted
256 (NumberObjectImp::construct): adjusted
257 * kjs/number_object.h: shring RegExp-related objects a little
258 * kjs/regexp_object.cpp:
259 (RegExpPrototype::RegExpPrototype): Adjust for size tweaks
260 (RegExpObjectImp::RegExpObjectImp): ditto
261 * kjs/regexp_object.h:
262 * kjs/string_object.cpp:
263 (StringInstance::StringInstance): inherit from JSWrapperObject
264 (StringProtoFunc::callAsFunction): adjusted
265 * kjs/string_object.h:
266 * JavaScriptCore.exp: Exported new methods as needed.
267 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files to build.
269 2006-08-04 Brady Eidson <beidson@apple.com>
271 Reviewed by Geoff's rubber stamp
273 Fix a build break on Intel hardware causes by adapting stricter
274 compiler warnings (-Wshorten-64-to-32)
277 (assertEqualsAsNumber): manually cast some doubles to floats
280 2006-08-04 Sam Weinig <sam.weinig@gmail.com>
284 - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10192
285 Make WebCore (and friends) compile with -Wshorten-64-to-32
287 * Adds -Wshorten-64-to-32 flag to Xcode project.
288 * Adds explicit casts where OK.
292 (JSNodeList_getProperty):
293 * JavaScriptCore.xcodeproj/project.pbxproj:
295 2006-08-04 Adam Roben <aroben@apple.com>
299 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Convert
302 2006-08-03 Sam Weinig <sam.weinig@gmail.com>
306 - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
307 Make WebCore compile with -Wundef
309 * Adds -Wundef flag to Xcode project
310 * Converts #ifs to #ifdef and #ifndefs where needed.
311 * Added #define YYMAXDEPTH 10000 in kjs/grammar.y
312 to fix a warning from within Bison.
314 * JavaScriptCore.xcodeproj/project.pbxproj:
315 * bindings/jni/jni_jsobject.cpp:
316 (JavaJSObject::getSlot):
317 (JavaJSObject::setSlot):
319 * bindings/objc/objc_class.mm:
320 (KJS::Bindings::ObjcClass::methodsNamed):
321 (KJS::Bindings::ObjcClass::fieldNamed):
322 * bindings/objc/objc_instance.mm:
323 (ObjcInstance::invokeMethod):
324 * bindings/objc/objc_runtime.mm:
325 (ObjcMethod::getMethodSignature):
331 2006-08-03 Anders Carlsson <acarlsson@apple.com>
333 Reviewed by John Sullivan.
337 Return *this in operator=
339 2006-08-03 Adam Roben <aroben@apple.com>
343 - Fixed Windows build
345 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
346 * wtf/MathExtras.h: Implement inline versions of these functions
350 2006-08-02 Adam Roben <aroben@apple.com>
356 * kjs/date_object.cpp:
359 2006-07-29 Darin Adler <darin@apple.com>
361 - Removed tabs from these source files that still had them.
362 We don't use them; that way source files look fine in editors
363 that have tabs set to 8 spaces or to 4 spaces.
364 - Removed allow-tabs Subversion property from the files too.
366 * bindings/NP_jsobject.cpp:
367 * bindings/c/c_utility.cpp:
368 * bindings/jni/jni_runtime.cpp:
369 * bindings/jni/jni_utility.cpp:
370 * bindings/objc/objc_utility.mm:
371 * bindings/runtime.cpp:
372 * bindings/runtime_method.cpp:
373 * bindings/testbindings.cpp:
374 * bindings/testbindings.mm:
375 * kjs/date_object.cpp:
380 * kjs/string_object.cpp:
383 2006-07-29 Darin Adler <darin@apple.com>
385 * tests/mozilla/expected.html: Update test results now that regress-185165.js
386 is succeeding. I suspect Anders fix for bug 4620655 is the reason.
388 2006-07-29 Sam Weinig <sam.weinig@gmail.com>
392 - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10080
393 Adopt pedantic changes from the Unity project to improve
394 cross-compiler compatibility
397 * Removing trailing semicolon from namespace braces.
398 * Removing trailing comma from last enum declaration.
399 * Updating to match style guidelines.
400 * Adding missing newline to the end of the file.
401 * Turning on gcc warning for missing newline at the end of a source file
402 (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
403 * Alphabetical sorting of Xcode source list files.
404 * Replace use of non-portable variable-size array with Vector.
405 * Use C-style comments instead of C++ comments in files that might
406 be included by either C or C++ files.
408 * API/JSCallbackConstructor.cpp:
409 (KJS::JSCallbackConstructor::construct):
410 * API/JSCallbackFunction.cpp:
411 (KJS::JSCallbackFunction::callAsFunction):
412 * API/JSCallbackObject.cpp:
413 (KJS::JSCallbackObject::construct):
414 (KJS::JSCallbackObject::callAsFunction):
415 * JavaScriptCore.xcodeproj/project.pbxproj:
416 * JavaScriptCorePrefix.h:
417 * bindings/jni/jni_class.cpp:
418 (JavaClass::fieldNamed):
419 * bindings/jni/jni_class.h:
420 * bindings/jni/jni_instance.cpp:
421 (JavaInstance::JavaInstance):
422 (JavaInstance::valueOf):
423 * bindings/jni/jni_objc.mm:
424 (KJS::Bindings::dispatchJNICall):
425 * bindings/jni/jni_runtime.cpp:
426 (JavaParameter::JavaParameter):
427 (JavaArray::JavaArray):
428 * bindings/jni/jni_runtime.h:
429 * bindings/jni/jni_utility.h:
430 * bindings/objc/objc_instance.h:
431 * bindings/runtime_array.h:
437 2006-07-29 Mike Emmel <mike.emmel@gmail.com>
441 - fixes for Linux build
443 * JavaScriptCoreSources.bkl: Added new files to build, kjs/PropertyNameArray.cpp
444 and kjs/testkjs.cpp, and removed old files.
446 2006-07-24 Dan Waylonis <waylonis@google.com>
448 Reviewed and tweaked a bit by Darin.
450 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
451 jsNull and NSNull not properly converted between JS and ObjC
453 * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue):
454 Added case for converting NSNull to jsNull.
456 2006-07-24 Rob Buis <buis@kde.org>
460 http://bugzilla.opendarwin.org/show_bug.cgi?id=4258
461 Date().toString() only includes GMT offset, not timezone string
463 Use the info in tm_zone to append timezone abbreviation
464 to Date().toString().
466 * kjs/date_object.cpp:
469 2006-07-24 Rob Buis <buis@kde.org>
473 http://bugzilla.opendarwin.org/show_bug.cgi?id=5257
474 setYear() does not match FireFox/IE behavior
476 Make sure the right values end up in tm_year.
478 * kjs/date_object.cpp:
481 2006-07-23 Mark Rowe <opendarwin.org@bdash.net.nz>
485 Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
486 http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
488 JavaScriptCore portion of the fix.
490 * JavaScriptCore.exp: Update symbol for change in argument type.
492 (Debugger::detach): Clear map of recent exceptions.
493 (Debugger::hasHandledException): Track the most recent exception
494 thrown by an interpreter.
495 (Debugger::exception): Change exception argument to a JSValue.
498 (Node::debugExceptionIfNeeded): Notify the debugger of an exception
499 if it hasn't seen it before.
500 (ThrowNode::execute): Notify the debugger that an exception is being thrown.
503 2006-07-23 Geoffrey Garen <ggaren@apple.com>
505 Patch by Eric Albert, reviewed by Darin and me.
507 - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code
508 crashes (Collector::markStackObjectsConservatively)
510 * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
512 (JavaJSObject::getSlot):
513 (JavaJSObject::setSlot):
515 (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
516 an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
517 and we want to scan the stack for pointers.
518 * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the
519 XCode war has started up again!
521 === Safari-521.20 ===
523 2006-07-21 Geoffrey Garen <ggaren@apple.com>
527 <rdar://problem/4507265> REGRESSION: overlays don't work on HousingMaps.com (Google Maps-based site)
529 - Added support for strings that masquerade as undefined. Currently used
530 by WebCore to implement undetectable style.filter.
532 The name is a little long, but it's only used in one line of code, so I
533 thought clarity should win over brevity.
535 * JavaScriptCore.exp:
536 * JavaScriptCore.xcodeproj/project.pbxproj:
538 * kjs/string_object.h:
539 (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined):
540 (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined):
541 (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean):
543 === Safari-521.19 ===
545 2006-07-20 Steve Falkenburg <sfalken@apple.com>
550 (KJS::escapeStringForPrettyPrinting):
552 2006-07-19 Anders Carlsson <acarlsson@apple.com>
556 <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work
558 * kjs/nodes2string.cpp:
559 (StringNode::streamTo):
560 Return the escaped string.
562 (RegExpNode::streamTo):
563 Use the correct syntax.
566 (KJS::escapeStringForPrettyPrinting):
568 Add escape function which escapes a string for pretty-printing so it can be parsed again.
570 * wtf/unicode/icu/UnicodeIcu.h:
571 (WTF::Unicode::isPrintableChar):
574 2006-07-18 Maciej Stachowiak <mjs@apple.com>
576 Reviewed by Adele Peterson.
578 <rdar://problem/4589530> REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers)
587 2006-07-18 Tim Omernick <timo@apple.com>
589 Reviewed by Tim Hatcher.
591 Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject
596 === Safari-521.18 ===
598 2006-07-18 Timothy Hatcher <timothy@apple.com>
600 Made the following headers public:
609 * JavaScriptCore.xcodeproj/project.pbxproj:
611 2006-07-17 Geoffrey Garen <ggaren@apple.com>
615 - Added automatic prototype creation for classes.
617 A class stores a weak reference to a prototype, which is cleared when
618 the prototype is garbage collected, to avoid a reference cycle.
620 We now have an attributes field in JSClassDefinition, that currently is
621 used only to override automatic prototype creation when you want to manage your
622 own prototypes, but can be extended in the future for other nefarious purposes.
624 Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter
625 allowing you to manage your own prototypes.
627 JSObjectMakeConstructor is more interesting now, able to make a constructor
628 on your behalf if you just give it a class.
630 - Removed bogus old code from minidom.js.
632 - Tweaked the headerdocs.
634 - Added more GC testing, which caught some leaks, and tested more funny
635 edge cases in lookup, which caught a lookup bug. Removed some testing
636 we used to do with MyObject because it was redundant with the new, cool
639 While fixing the lookup bug I retracted this change:
641 "If a static setProperty callback returns 'false', to indicate that the
642 property was not set, we no longer forward the set request up the class
643 chain, because that's almost certainly not what the programmer expected."
645 Returning false when setting a static property is a little silly, but you can see
646 it being useful when shadowing a base class's static properties, and, regardless
647 of usefullness, this is the defined behavior of the setProperty callback.
649 - Plus a little ASCII art, for the kids.
651 2006-07-17 Timothy Hatcher <timothy@apple.com>
655 <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
657 Moves WebScriptObject and WebUndefined up to WebCore.
658 This change does create an upwards-dependancy on WebScriptObject existing
659 in the loaded process, but this code path in JavaScriptCore does not get used
660 unless it is through WebKit/WebCore. Moving all of the binding code out of
661 JavaScriptCore might make sense in the future.
663 * JavaScriptCore.exp:
664 * JavaScriptCore.xcodeproj/project.pbxproj:
665 * bindings/objc/WebScriptObject.h: Replaced.
666 * bindings/objc/WebScriptObject.mm: Removed.
667 * bindings/objc/WebScriptObjectPrivate.h: Removed.
668 * bindings/objc/objc_class.h:
669 * bindings/objc/objc_instance.h:
670 * bindings/objc/objc_instance.mm:
671 (ObjcInstance::~ObjcInstance):
672 * bindings/objc/objc_runtime.h:
673 * bindings/objc/objc_runtime.mm:
674 (convertValueToObjcObject):
675 * bindings/objc/objc_utility.mm:
676 (KJS::Bindings::convertValueToObjcValue):
677 (KJS::Bindings::convertObjcValueToValue):
678 (KJS::Bindings::createObjcInstanceForValue):
680 2006-07-17 Darin Adler <darin@apple.com>
682 * API/JSBase.h: Fix comment formatting where things used to be lined up but
683 are now ragged. Got rid of spaces that attempted to line things up.
684 * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments.
686 2006-07-17 Geoffrey Garen <ggaren@apple.com>
690 - Removed the exception parameter from the initialize callback and, by extension,
691 JSObjectMake. We have never had a need for exceptions when iniitializing,
692 so the parameter seemed likely to "get in the way."
694 Also, an exception in JavaScript is thrown in response to input --
695 "invalid URL", "index not a number", etc., so it's the job of the
696 constructor function, not the initialize method, to throw.
698 If initialize *really* wants to throw, it can communicate the throw to
699 the constructor through the constructed object's private data (e.g., set
700 it to NULL, signaling to the consntructor that initialization failed.)
702 - Added JSObjectMakeWithData, which enables a constructor to set private
703 data on an object *before* it has been initialized. That way, the initialize
704 methods can properly operate on the data.
706 * API/JSNode.c: Moved ref into the initialize method, for better encapsulation,
707 now that it's possible.
708 * API/JSNodeList.c: ditto
710 (main): Do more aggressive garbage collection to test ref/deref and
712 * API/minidom.js: store childNodes in a temporary so it doesn't get re-created
713 like a thousand times. This makes debugging ref/deref easier
715 2006-07-17 Geoffrey Garen <ggaren@apple.com>
719 - Changed the initialize callback to run from least derived class (parent
720 class) to most derived class. This enables C++ style initialization,
721 and derived class overriding of member data.
723 - Added excpetion propopgation to JSObjectMake, to support initialize
724 exceptions, and generally round out our policy of making function
725 signatures as long as possible.
727 * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're
730 2006-07-17 Geoffrey Garen <ggaren@apple.com>
734 - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback,
735 to match JSObjectMakeFunctionWithCallback.
737 - Added prototype parameter, so the generated constructor
738 automatically works with hasInstance / instanceof
740 - Moved hasInstance implementation from InternalFunctionImp to JSObject
741 so that subclasses can inherit it without inheriting function-related baggage.
742 More refactoring here would be good, but this seems like a good short-term
745 (KJS::JSCallbackFunction::implementsHasInstance): override and return false,
746 because callback functions aren't constructors.
748 2006-07-17 Maciej Stachowiak <mjs@apple.com>
752 - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations;
753 except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.
755 Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
756 but usually uninteresting parameter.
760 (JSCheckScriptSyntax):
763 * API/JSCallbackObject.cpp:
764 (KJS::JSCallbackObject::JSCallbackObject):
765 (KJS::JSCallbackObject::init):
766 (KJS::JSCallbackObject::getOwnPropertySlot):
767 (KJS::JSCallbackObject::put):
768 (KJS::JSCallbackObject::deleteProperty):
769 (KJS::JSCallbackObject::toNumber):
770 (KJS::JSCallbackObject::toString):
771 * API/JSContextRef.cpp:
772 (JSGlobalContextCreate):
773 (JSGlobalContextRetain):
774 (JSGlobalContextRelease):
775 (JSContextGetGlobalObject):
776 * API/JSContextRef.h:
778 (JSNodePrototype_appendChild):
779 (JSNodePrototype_removeChild):
780 (JSNodePrototype_replaceChild):
781 (JSNode_getNodeType):
782 (JSNode_getFirstChild):
785 (JSNodeListPrototype_item):
787 (JSNodeList_getProperty):
788 (JSNodeList_prototype):
789 * API/JSObjectRef.cpp:
791 (JSObjectMakeFunctionWithCallback):
792 (JSObjectMakeConstructor):
793 (JSObjectMakeFunction):
794 (JSObjectGetPrototype):
795 (JSObjectSetPrototype):
796 (JSObjectHasProperty):
797 (JSObjectGetProperty):
798 (JSObjectSetProperty):
799 (JSObjectGetPropertyAtIndex):
800 (JSObjectSetPropertyAtIndex):
801 (JSObjectDeleteProperty):
802 (JSObjectIsFunction):
803 (JSObjectCallAsFunction):
804 (JSObjectIsConstructor):
805 (JSObjectCallAsConstructor):
806 (JSObjectCopyPropertyNames):
808 * API/JSStringRef.cpp:
809 * API/JSValueRef.cpp:
811 (JSValueIsUndefined):
817 (JSValueIsObjectOfClass):
819 (JSValueIsStrictEqual):
820 (JSValueIsInstanceOfConstructor):
821 (JSValueMakeUndefined):
823 (JSValueMakeBoolean):
828 (JSValueToStringCopy):
836 (MyObject_getProperty):
837 (MyObject_deleteProperty):
838 (MyObject_callAsFunction):
839 (MyObject_callAsConstructor):
840 (MyObject_convertToType):
841 (print_callAsFunction):
844 2006-07-16 Geoffrey Garen <ggaren@apple.com>
846 Approved by Maciej, RS by Beth.
848 JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback
849 JSObjectMakeFunctionWithBody -> JSObjectMakeFunction
851 because the latter is more common, and more fundamental, than the former.
856 * API/JSCallbackObject.cpp:
857 (KJS::JSCallbackObject::getOwnPropertySlot):
858 (KJS::JSCallbackObject::put):
859 (KJS::JSCallbackObject::deleteProperty):
860 (KJS::JSCallbackObject::getPropertyNames):
861 (KJS::JSCallbackObject::staticValueGetter):
862 (KJS::JSCallbackObject::staticFunctionGetter):
863 * API/JSClassRef.cpp:
864 (OpaqueJSClass::OpaqueJSClass):
865 (OpaqueJSClass::~OpaqueJSClass):
867 * API/JSObjectRef.cpp:
869 (JSObjectMakeFunctionWithCallback):
870 (JSObjectMakeFunction):
871 (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
872 (JSObjectCopyPropertyNames):
879 * JavaScriptCore.exp:
881 2006-07-16 Geoffrey Garen <ggaren@apple.com>
885 Replace __JS with OpaqueJS because the former, while used by CF, is
886 a prefix that's triply-reserved by the compiler. (_* is reserved in global
887 names, _[A-Z] is reserved in all names, and __ is reserved in all names
890 Opaque is an alternative used by other Mac OS X framewokrs.
895 * API/JSCallbackObject.cpp:
896 (KJS::JSCallbackObject::getOwnPropertySlot):
897 (KJS::JSCallbackObject::put):
898 (KJS::JSCallbackObject::deleteProperty):
899 (KJS::JSCallbackObject::getPropertyNames):
900 (KJS::JSCallbackObject::staticValueGetter):
901 (KJS::JSCallbackObject::staticFunctionGetter):
902 * API/JSClassRef.cpp:
903 (OpaqueJSClass::OpaqueJSClass):
904 (OpaqueJSClass::~OpaqueJSClass):
906 * API/JSObjectRef.cpp:
908 (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
909 (JSObjectCopyPropertyNames):
911 2006-07-16 Darin Adler <darin@apple.com>
913 - try to fix Windows build
915 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
916 Added some recently added files, removed some recently removed.
918 2006-07-16 Geoffrey Garen <ggaren@apple.com>
922 - Change getProperty* to return undefined, rather than NULL, for missing
923 properties, since that's what the spec says. Also added exception out
924 parameters to the *Index functions, because they can call through to the
925 regular functions, which can throw for custom objects.
927 * API/JSObjectRef.cpp:
928 (JSObjectGetProperty):
929 (JSObjectGetPropertyAtIndex):
930 (JSObjectSetPropertyAtIndex):
935 2006-07-16 Geoffrey Garen <ggaren@apple.com>
939 - Properly document and handle NULL callbacks for static properties. We
940 throw an exception in any case other than a ReadOnly property with a NULL
941 setProperty callback, because a NULL callback almost certainly indicates
942 a programming error. Also throw an exception if hasProperty returns true
943 for a property that getProperty can't get.
945 - If a static setProperty callback returns 'false', to indicate that the
946 property was not set, we no longer forward the set request up the class
947 chain, because that's almost certainly not what the programmer expected.
949 * API/JSCallbackObject.cpp:
950 (KJS::JSCallbackObject::getOwnPropertySlot):
951 (KJS::JSCallbackObject::put):
952 (KJS::JSCallbackObject::staticValueGetter):
953 (KJS::JSCallbackObject::staticFunctionGetter):
954 (KJS::JSCallbackObject::callbackGetter):
958 (MyObject_hasProperty):
961 2006-07-16 Geoffrey Garen <ggaren@apple.com>
965 - Added names to functions.
967 - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors.
968 The private data idiom is that a JS object stores its native implementation
969 as private data. For functions and constructors, the native implementation is nothing
970 more than the callback they already store, so supporting private data, too,
971 confuses the idiom. If you *really* want, you can still create a custom
972 function with private data.
974 * API/JSCallbackConstructor.cpp:
975 * API/JSCallbackConstructor.h:
976 * API/JSCallbackFunction.cpp:
977 (KJS::JSCallbackFunction::JSCallbackFunction):
978 * API/JSCallbackFunction.h:
979 * API/JSCallbackObject.cpp:
980 (KJS::JSCallbackObject::staticFunctionGetter):
981 * API/JSObjectRef.cpp:
982 (JSObjectMakeFunction):
983 (JSObjectMakeFunctionWithBody):
984 (JSObjectGetPrivate):
985 (JSObjectSetPrivate):
992 2006-07-15 Maciej Stachowiak <mjs@apple.com>
996 - switch property lists to be vector+set of Identifiers instead of list of References
998 This has the following benefits:
1000 - no duplicates in property lists
1001 - simplifies API calls
1002 - probably more efficient, since linked list is gone
1003 - entirely removed Reference, ReferenceList and ProtectedReference types from the API
1005 * kjs/PropertyNameArray.cpp: Added.
1006 (KJS::PropertyNameArray::add): Check set, if not already there, add to
1008 * kjs/PropertyNameArray.h: Added.
1009 (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines
1010 a set and a vector to make a unique but ordered list of identifiers.
1011 (KJS::PropertyNameArray::begin): ditto
1012 (KJS::PropertyNameArray::end): ditto
1013 (KJS::PropertyNameArray::size): ditto
1014 (KJS::PropertyNameArray::operator[]): ditto
1015 * kjs/array_instance.h:
1016 * kjs/array_object.cpp:
1017 (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated
1018 for PropertyNameArray
1019 (ArrayInstance::setLength): updated for PropertyNameArray
1020 (ArrayInstance::pushUndefinedObjectsToEnd): ditto
1022 (ForInNode::execute): updated for PropertyNameArray
1025 (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated
1026 for PropertyNameArray
1028 * kjs/property_map.cpp:
1029 (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray
1030 (KJS::PropertyMap::getSparseArrayPropertyNames): ditto
1031 * kjs/property_map.h:
1032 * kjs/protected_reference.h: Removed.
1033 * kjs/reference.cpp: Removed.
1034 * kjs/reference.h: Removed.
1035 * kjs/reference_list.cpp: Removed.
1036 * kjs/reference_list.h: Removed.
1037 * kjs/scope_chain.cpp:
1038 (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList.
1039 * kjs/string_object.cpp:
1040 (StringInstance::getPropertyNames): Updated for new approach.
1041 * kjs/string_object.h:
1044 (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray*
1047 * API/JSCallbackObject.cpp:
1048 (KJS::JSCallbackObject::getPropertyNames): Fixed for new API.
1049 * API/JSCallbackObject.h:
1050 * API/JSObjectRef.cpp:
1051 (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended
1052 JSPropertyNameArrayRef.
1053 (JSObjectCopyPropertyNames): New API call - renamed / refactored from
1054 JSObjectCreatePropertyList
1055 (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray.
1056 (JSPropertyNameArrayRelease): new release call for - " -.
1057 (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you
1058 can now get the count and items in any order.
1059 (JSPropertyNameArrayGetNameAtIndex): See above.
1060 (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque
1062 * API/JSObjectRef.h: Prototyped new functions, removed old ones
1063 * JavaScriptCore.exp: Updated exported symbols.
1064 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old.
1066 (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm.
1067 (main): Updated for new API.
1069 2006-07-15 Darin Adler <darin@apple.com>
1071 - oops, missed a few more arrays that had to be const
1074 (JSNodePrototype_appendChild): Added const.
1075 (JSNodePrototype_removeChild): Ditto.
1076 (JSNodePrototype_replaceChild): Ditto.
1077 (JSNode_construct): Ditto.
1079 (JSNodeListPrototype_item): Ditto.
1080 * API/JSObjectRef.cpp:
1081 (JSObjectMakeFunctionWithBody): Ditto.
1082 (JSObjectCallAsFunction): Ditto.
1083 (JSObjectCallAsConstructor): Ditto.
1087 (MyObject_callAsFunction): Ditto.
1088 (MyObject_callAsConstructor): Ditto.
1089 (print_callAsFunction): Ditto.
1090 (myConstructor_callAsConstructor): Ditto.
1092 2006-07-15 Darin Adler <darin@apple.com>
1096 * API/JSNode.h: Made an array parameter const.
1097 * API/JSObjectRef.h: Made array parameters const. Fixed a comment.
1099 2006-07-15 Geoffrey Garen <ggaren@apple.com>
1103 - JSObjectMakeFunctionWithBody includes a function name and named parameters now.
1105 * API/JSObjectRef.cpp:
1106 (JSObjectMakeFunctionWithBody):
1107 * API/JSObjectRef.h:
1109 (assertEqualsAsUTF8String): More informative failure reporting.
1110 (main): Test more function cases.
1112 2006-07-15 Geoffrey Garen <ggaren@apple.com>
1116 - Moved the arguments passed to JSClassCreate into a single structure,
1117 called JSClassDefinition. This will enable easier structure
1118 migration/versioning in the future, if necessary.
1120 - Added support for class names.
1122 - kJSClassDefinitionNull replaces kJSObjectCallbacksNone.
1124 - JSClass is becoming a fairly complex struct, so I migrated all of its
1125 implementation other than reference counting to the sruct.
1127 - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're
1128 declared in JSObjectRef.h
1130 - Also added some more informative explanation to the class structure doc.
1132 2006-07-15 Darin Adler <darin@apple.com>
1136 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8395
1137 <rdar://problem/4613467>
1138 REGRESSION: RegEx seems broken for hex escaped non breaking space
1140 Test: fast/js/regexp-extended-characters-more.html
1143 (match): Got rid of utf16Length local variable to guarantee there's no
1144 extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16
1145 code that were using the length variable, which is the UTF-8 length of
1146 a character in the pattern, to move in the UTF-16 subject string. Instead
1147 they hardcode lengths of 1 and 2 since the code already handles BMP
1148 characters and surrogate pairs separately. Also fixed some DPRINTF so
1149 I could compile with DEBUG on.
1150 (pcre_exec): Changed a place that was checking for multibyte characters
1151 in the subject string to use ISMIDCHAR. Instead it was using hardcoded
1152 logic that was right for UTF-8 but wrong for UTF-16.
1154 * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile
1157 2006-07-14 Geoffrey Garen <ggaren@apple.com>
1161 Global replace in the API of argc/argv with argumentCount/arguments.
1163 2006-07-14 Geoffrey Garen <ggaren@apple.com>
1167 - Finalized exception handling in the API.
1169 setProperty can throw because it throws for built-in arrays. getProperty
1170 and deleteProperty can throw because setProperty can throw and we want
1171 to be consistent, and also because they seem like "actions." callAsFunction,
1172 callAsConstructor, and hasInstance can throw, because they caan throw for
1175 toBoolean can't throw because it's defined that way in the spec.
1177 - Documented that toBoolean and toObject can't be overridden by custom
1178 objects because they're defined that way in the spec.
1180 === Safari-521.17 ===
1182 2006-07-14 Geoffrey Garen <ggaren@apple.com>
1186 - Implemented ref-counting of JSContexts by splitting into two datatypes:
1187 JSGlobalContext, which you can create/retain/release, and JSContext, which
1190 Internally, you retain a JSGlobalContext/ExecState by retaining its
1191 interpreter, which, in the case of a global ExecState, owns it.
1193 - Also made ~Interpreter() protected to catch places where Interpreter
1194 is manually deleted. (Can't make it private because some crazy fool
1195 decided it would be a good idea to subclass Interpreter in other frameworks.
1199 (toJS): Added cast for new JSGlobalContext
1200 * API/JSStringRef.h: Changed vague "you must" language to more specific
1201 (but, ultimately, equally vague) "behavior is undefined if you don't"
1203 (KJS::Interpreter::Interpreter): Factored more common initialization into
1205 * kjs/interpreter.h:
1206 (KJS::Interpreter::ref): new
1207 (KJS::Interpreter::deref): new
1208 (KJS::Interpreter::refCount): new
1210 (doIt): Ref-count the interpreter.
1212 2006-07-14 Maciej Stachowiak <mjs@apple.com>
1216 - removed bool return value from JSObjectSetProperty, since it is inefficient and
1217 also doesn't work quite right
1218 - added JSObjectGetPropertyAtIndex and JSObjectSetPropertyAtIndex
1220 * API/JSObjectRef.cpp:
1221 (JSObjectSetProperty): Removed return value and canPut stuff.
1222 (JSObjectGetPropertyAtIndex): Added.
1223 (JSObjectSetPropertyAtIndex): Added.
1224 * API/JSObjectRef.h: Prototyped and documented new functions.
1226 2006-07-14 Geoffrey Garen <ggaren@apple.com>
1230 Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into
1231 JSBase.h/.cpp. They don't belong in the value-specific or context-specific
1232 files because they're not part of the value or context implementations.
1235 * API/JSContextRef.cpp:
1236 (JSContextGetGlobalObject):
1237 * API/JSContextRef.h:
1238 * API/JSValueRef.cpp:
1241 * JavaScriptCore.xcodeproj/project.pbxproj:
1243 2006-07-13 Timothy Hatcher <timothy@apple.com>
1247 Moved JavaScriptCore to be a public framework.
1249 * JavaScriptCore.xcodeproj/project.pbxproj:
1251 2006-07-13 Mark Rowe <opendarwin.org@bdash.net.nz>
1253 Reviewed by Geoffrey.
1255 http://bugzilla.opendarwin.org/show_bug.cgi?id=9742
1256 Bug 9742: REGRESSION: WebKit hangs when loading <http://www.vtbook.com>
1259 (KJS::JSValue::getUInt32): Only types tagged as numeric can be converted to UInt32.
1261 2006-07-13 Geoffrey Garen <ggaren@apple.com>
1265 - Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax
1266 - Added exception out parameters to JSValueTo* and JSValueIsEqual because
1268 - Removed JSObjectGetDescription because it's useless and vague, and
1269 JSValueToString/JSValueIsObjectOfClass do a better job, anyway
1270 - Clarified comments about "IsFunction/Constructor" to indicate that they
1271 are true of all functions/constructors, not just those created by JSObjectMake*
1273 2006-07-12 Geoffrey Garen <ggaren@apple.com>
1277 Finished previously approved JSInternalString -> JSString conversion
1278 by renaming the files.
1280 * API/JSCallbackObject.cpp:
1281 * API/JSInternalStringRef.cpp: Removed.
1282 * API/JSInternalStringRef.h: Removed.
1283 * API/JSStringRef.cpp: Added.
1284 * API/JSStringRef.h: Added.
1285 * API/JavaScriptCore.h:
1286 * JavaScriptCore.xcodeproj/project.pbxproj:
1288 2006-07-12 Geoffrey Garen <ggaren@apple.com>
1292 - Removed context and exception parameters from JSObjectGetPropertyEnumerator,
1293 removing the spurious use of ExecState inside JavaScriptCore that made
1294 us think this was necessary in the first place.
1296 (StringInstance::getPropertyList): Use getString instead of toString because
1297 we know we're dealing with a string -- we put it there in the first place.
1298 While we're at it, store the string's size instead of retrieving it each time
1299 through the loop, to avoid the unnecessary killing of puppies.
1300 * kjs/string_object.h:
1302 2006-07-12 Maciej Stachowiak <mjs@apple.com>
1306 - add handling of hasInstance callback for API objects
1308 * API/JSCallbackObject.cpp:
1309 (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present.
1310 (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback.
1311 * API/JSCallbackObject.h:
1312 * API/JSClassRef.cpp:
1313 * API/JSObjectRef.h:
1315 (MyObject_hasInstance): Test case; should match what construct would do.
1318 2006-07-11 Geoffrey Garen <ggaren@apple.com>
1322 - Implemented a vast number of renames and comment clarifications
1323 suggested during API review.
1325 JSInternalString -> JSString
1326 JS*Make -> JSValueMake*, JSObjectMake*
1327 JSTypeCode -> JSType
1328 JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code)
1329 JSGC*Protect -> JSValue*Protect
1330 JS*Callback -> JSObject*Callback
1331 JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback
1332 JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName
1334 JSStringCreateWithUTF8CString, JSStringGetUTF8CString,
1335 JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString,
1336 JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters.
1338 - Changed functions taking a JSValue out arg and returning a bool indicating
1339 whether it was set to simply return a JSValue or NULL.
1341 - Removed JSStringGetCharacters because it's more documentation than code,
1342 and it's just a glorified memcpy built on existing API functionality.
1344 - Moved standard library includes into the headers that actually require them.
1346 - Standardized use of the phrase "Create Rule."
1348 - Removed JSLock from make functions that don't allocate.
1350 - Added exception handling to JSValueToBoolean, since we now allow
1351 callback objects to throw exceptions upon converting to boolean.
1353 - Renamed JSGCCollect to JSGarbageCollect.
1355 2006-07-10 Geoffrey Garen <ggaren@apple.com>
1359 - Changed public header includes to the <JavaScriptCore/ style.
1360 - Changed instances of 'buffer' to 'string' since we decided on
1361 JSInternalString instead of JSStringBuffer.
1363 * API/JSContextRef.h:
1364 * API/JSInternalStringRef.cpp:
1366 (JSInternalStringRetain):
1367 (JSInternalStringRelease):
1368 (JSValueCopyStringValue):
1369 (JSInternalStringGetLength):
1370 (JSInternalStringGetCharactersPtr):
1371 (JSInternalStringGetCharacters):
1372 (JSInternalStringGetMaxLengthUTF8):
1373 (JSInternalStringGetCharactersUTF8):
1374 (CFStringCreateWithJSInternalString):
1375 * API/JSInternalStringRef.h:
1377 (JSNodePrototype_appendChild):
1378 (JSNode_getNodeType):
1379 * API/JSObjectRef.cpp:
1380 (JSObjectCallAsConstructor):
1382 * API/JavaScriptCore.h:
1387 (MyObject_getPropertyList):
1388 (myConstructor_callAsConstructor):
1389 (main): I noticed that we were prematurely releasing some string buffers,
1390 so I moved their release calls to the end of main(). I got rid of 'Buf' in *Buf
1391 (sometimes changing to 'IString', when necessary to differentiate a variable)
1392 to match the buffer->string change.
1394 === Safari-521.16 ===
1396 2006-07-10 Darin Adler <darin@apple.com>
1398 * kjs/value.cpp: (KJS::JSValue::toInt32Inline): Added inline keyword one more place.
1401 2006-07-10 Darin Adler <darin@apple.com>
1403 - fix the release build
1407 (KJS::JSValue::toInt32Inline): Move the code here to an inline.
1408 (KJS::JSValue::toInt32): Call the inline from both overloaded toInt32 functions.
1410 2006-07-10 David Kilzer <ddkilzer@kilzer.net>
1414 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
1415 Implement select.options.add() method
1417 * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method.
1418 * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for
1419 kjs/value.h to make it available as a forwarded header.
1421 (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method.
1422 The new method returns a boolean value if no entry is found in the lookup table.
1424 (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument.
1425 * kjs/value.h: Ditto.
1427 2006-07-10 Geoffrey Garen <ggaren@apple.com>
1429 No review necessary. Removed bogus file I accidentally checked in before.
1431 * API/JSInternalSringRef.h: Removed.
1433 2006-07-10 Geoffrey Garen <ggaren@apple.com>
1437 Added exception out parameter to API object callbacks, removed semi-bogus
1438 JSContext(.*)Exception functions.
1440 To make these calls syntactically simple, I added an exceptionSlot()
1441 method to the ExecState class, which provides a JSValue** slot in which to
1442 store a JSValue* exception.
1446 * API/JSCallbackConstructor.cpp:
1447 (KJS::JSCallbackConstructor::construct):
1448 * API/JSCallbackFunction.cpp:
1449 (KJS::JSCallbackFunction::callAsFunction):
1450 * API/JSCallbackObject.cpp:
1451 (KJS::JSCallbackObject::init):
1452 (KJS::JSCallbackObject::getOwnPropertySlot):
1453 (KJS::JSCallbackObject::put):
1454 (KJS::JSCallbackObject::deleteProperty):
1455 (KJS::JSCallbackObject::construct):
1456 (KJS::JSCallbackObject::callAsFunction):
1457 (KJS::JSCallbackObject::getPropertyList):
1458 (KJS::JSCallbackObject::toBoolean):
1459 (KJS::JSCallbackObject::toNumber):
1460 (KJS::JSCallbackObject::toString):
1461 (KJS::JSCallbackObject::staticValueGetter):
1462 (KJS::JSCallbackObject::callbackGetter):
1463 * API/JSContextRef.cpp:
1465 * API/JSContextRef.h:
1467 (JSNodePrototype_appendChild):
1468 (JSNodePrototype_removeChild):
1469 (JSNodePrototype_replaceChild):
1470 (JSNode_getNodeType):
1471 (JSNode_getChildNodes):
1472 (JSNode_getFirstChild):
1476 (JSNodeListPrototype_item):
1477 (JSNodeList_length):
1478 (JSNodeList_getProperty):
1479 * API/JSObjectRef.h:
1483 (MyObject_initialize):
1484 (MyObject_hasProperty):
1485 (MyObject_getProperty):
1486 (MyObject_setProperty):
1487 (MyObject_deleteProperty):
1488 (MyObject_getPropertyList):
1489 (MyObject_callAsFunction):
1490 (MyObject_callAsConstructor):
1491 (MyObject_convertToType):
1492 (print_callAsFunction):
1493 (myConstructor_callAsConstructor):
1495 * JavaScriptCore.exp:
1497 (KJS::ExecState::exceptionHandle):
1499 2006-07-10 Geoffrey Garen <ggaren@apple.com>
1503 Improved type safety by implementing opaque JSValue/JSObject typing through
1504 abuse of 'const', not void*. Also fixed an alarming number of bugs
1505 exposed by this new type safety.
1507 I made one design change in JavaScriptCore, which is that the JSObject
1508 constructor should take a JSValue* as its prototype argument, not a JSObject*,
1509 since we allow the prototype to be any JSValue*, including jsNull(), for
1515 * API/JSCallbackConstructor.cpp:
1516 (KJS::JSCallbackConstructor::construct):
1517 * API/JSCallbackFunction.cpp:
1518 (KJS::JSCallbackFunction::callAsFunction):
1519 * API/JSCallbackObject.cpp:
1520 (KJS::JSCallbackObject::JSCallbackObject):
1521 (KJS::JSCallbackObject::getOwnPropertySlot):
1522 (KJS::JSCallbackObject::put):
1523 (KJS::JSCallbackObject::construct):
1524 (KJS::JSCallbackObject::callAsFunction):
1525 (KJS::JSCallbackObject::staticFunctionGetter):
1526 * API/JSCallbackObject.h:
1527 * API/JSContextRef.cpp:
1530 (JSNodePrototype_appendChild):
1531 (JSNodePrototype_removeChild):
1532 (JSNodePrototype_replaceChild):
1533 * API/JSObjectRef.cpp:
1535 (JSFunctionMakeWithBody):
1536 (JSObjectGetProperty):
1537 (JSObjectCallAsFunction):
1538 (JSObjectCallAsConstructor):
1539 * API/JSObjectRef.h:
1544 (KJS::JSObject::JSObject):
1546 2006-07-10 Geoffrey Garen <ggaren@apple.com>
1548 Approved by Maciej, Darin.
1550 Renamed JSStringBufferRef to JSInternalStringRef. "Internal string" means the
1551 JavaScript engine's internal string representation, which is the most
1552 low-level and efficient representation to use when interfacing with JavaScript.
1558 * API/JSCallbackObject.cpp:
1559 (KJS::JSCallbackObject::getOwnPropertySlot):
1560 (KJS::JSCallbackObject::put):
1561 (KJS::JSCallbackObject::deleteProperty):
1562 (KJS::JSCallbackObject::staticValueGetter):
1563 (KJS::JSCallbackObject::callbackGetter):
1564 * API/JSContextRef.cpp:
1567 * API/JSContextRef.h:
1568 * API/JSInternalStringRef.cpp: Added.
1570 (JSInternalStringCreate):
1571 (JSInternalStringCreateUTF8):
1572 (JSInternalStringRetain):
1573 (JSInternalStringRelease):
1574 (JSValueCopyStringValue):
1575 (JSInternalStringGetLength):
1576 (JSInternalStringGetCharactersPtr):
1577 (JSInternalStringGetCharacters):
1578 (JSInternalStringGetMaxLengthUTF8):
1579 (JSInternalStringGetCharactersUTF8):
1580 (JSInternalStringIsEqual):
1581 (JSInternalStringIsEqualUTF8):
1582 (JSInternalStringCreateCF):
1583 (CFStringCreateWithJSInternalString):
1584 * API/JSInternalStringRef.h: Added.
1586 (JSNodePrototype_appendChild):
1587 (JSNode_getNodeType):
1588 (JSNode_getChildNodes):
1589 (JSNode_getFirstChild):
1591 (JSNodeList_length):
1592 (JSNodeList_getProperty):
1593 * API/JSObjectRef.cpp:
1594 (JSFunctionMakeWithBody):
1595 (JSObjectGetDescription):
1596 (JSObjectHasProperty):
1597 (JSObjectGetProperty):
1598 (JSObjectSetProperty):
1599 (JSObjectDeleteProperty):
1600 (JSPropertyEnumeratorGetNext):
1601 (JSPropertyListAdd):
1602 * API/JSObjectRef.h:
1603 * API/JSStringBufferRef.cpp: Removed.
1604 * API/JSStringBufferRef.h: Removed.
1606 * API/JavaScriptCore.h:
1611 (assertEqualsAsUTF8String):
1612 (assertEqualsAsCharactersPtr):
1613 (assertEqualsAsCharacters):
1614 (MyObject_hasProperty):
1615 (MyObject_getProperty):
1616 (MyObject_setProperty):
1617 (MyObject_deleteProperty):
1618 (MyObject_getPropertyList):
1619 (print_callAsFunction):
1620 (myConstructor_callAsConstructor):
1622 * JavaScriptCore.exp:
1623 * JavaScriptCore.xcodeproj/project.pbxproj:
1625 2006-07-08 Tim Omernick <timo@apple.com>
1629 Added an OpenGL drawing model to the Netscape Plug-in API.
1633 2006-07-08 Timothy Hatcher <timothy@apple.com>
1637 Moved KJS_GetCreatedJavaVMs to jni_utility.cpp.
1638 Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym
1639 now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol
1640 are deprecated in Leopard.
1642 * JavaScriptCore.exp:
1643 * JavaScriptCore.xcodeproj/project.pbxproj:
1644 * bindings/jni/jni_utility.cpp:
1645 (KJS::Bindings::KJS_GetCreatedJavaVMs):
1646 * bindings/softlinking.c: Removed.
1647 * bindings/softlinking.h: Removed.
1649 2006-07-08 Geoffrey Garen <ggaren@apple.com>
1653 - Make JSObjectGetProperty return a JSValue or NULL, like JSEvaluate does.
1655 * API/JSObjectRef.cpp:
1656 (JSObjectGetProperty):
1657 * API/JSObjectRef.h:
1661 2006-07-08 Geoffrey Garen <ggaren@apple.com>
1663 Style change -- no review necessary.
1665 Use 0 instead of NULL in API .cpp files, to match our style guidelines.
1667 * API/JSContextRef.cpp:
1669 * API/JSObjectRef.cpp:
1670 (JSFunctionMakeWithBody):
1671 (JSObjectCallAsFunction):
1672 (JSObjectCallAsConstructor):
1673 * API/JSValueRef.cpp:
1676 2006-07-08 Geoffrey Garen <ggaren@apple.com>
1680 - Added ability to pass NULL for thisObject when calling JSObjectCallAsFunction,
1681 to match JSEvaluate.
1683 * API/JSObjectRef.cpp:
1684 (JSObjectCallAsFunction):
1685 * API/JSObjectRef.h:
1689 === Safari-521.15 ===
1691 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1695 - Standardized which functions take a JSContext as an argument. The rule is:
1696 if you might execute JavaScript, you take a JSContext, otherwise you don't.
1698 The FIXME in JSObjectRef.h requires refactoring some parts of Interpreter,
1699 but not API changes, so I'm putting it off until later.
1701 * API/JSCallbackObject.cpp:
1702 (KJS::JSCallbackObject::JSCallbackObject):
1703 (KJS::JSCallbackObject::init):
1704 * API/JSCallbackObject.h:
1705 * API/JSContextRef.cpp:
1707 * API/JSContextRef.h:
1708 * API/JSObjectRef.cpp:
1710 (JSPropertyEnumeratorGetNext):
1711 * API/JSObjectRef.h:
1713 (MyObject_initialize):
1715 * JavaScriptCore.exp:
1716 * kjs/array_object.cpp:
1717 (ArrayInstance::setLength):
1718 (ArrayInstance::pushUndefinedObjectsToEnd):
1720 (ForInNode::execute):
1721 * kjs/reference.cpp:
1722 (KJS::Reference::getPropertyName):
1723 (KJS::Reference::getValue):
1725 * kjs/scope_chain.cpp:
1726 (KJS::ScopeChain::print):
1728 2006-07-06 Geoffrey Garen <ggaren@apple.com>
1734 - Headerdoc finished
1737 - Added a JSContextRef argument to many functions, because you need a
1738 JSContextRef for doing virtually anything. I expect to add this argument
1739 to even more functions in a future patch.
1741 - Removed the globalObjectPrototype argument to JSContextCreate because
1742 you can't create an object until you have a context, so it's impossible
1743 to pass a prototype object to JSContextCreate. That's OK because (1) there's
1744 no reason to give the global object a prototype and (2) if you really want
1745 to, you can just use a separate call to JSObjectSetPrototype.
1747 - Removed the JSClassRef argument to JSClassCreate because it was unnecessary,
1748 and you need to be able to make the global object's class before you've
1749 created a JSContext.
1751 - Added an optional exception parameter to JSFunctionMakeWithBody because anything
1752 less would be uncivilized.
1754 - Made the return value parameter to JSObjectGetProperty optional to match
1755 all other return value parameters in the API.
1757 - Made JSObjectSetPrivate/JSObjectGetPrivate work on JSCallbackFunctions
1758 and JSCallbackConstructors. You could use an abstract base class or strategic
1759 placement of m_privateData in the class structure to implement this, but
1760 the former seemed like overkill, and the latter seemed too dangerous.
1762 - Fixed a bug where JSPropertyEnumeratorGetNext would skip the first property.
1765 - Reversed the logic of the JSChar #ifdef to avoid confusing headerdoc
1767 - Removed function names from @function declarations because headeroc
1768 can parse them automatically, and I wanted to rule out manual mismatch.
1770 - Changed Error::create to take a const UString& instead of a UString*
1771 because it was looking at me funny.
1773 - Renamed JSStringBufferCreateWithCFString to JSStringBufferCreateCF
1774 because the latter is more concise and it matches JSStringBufferCreateUTF8.
1776 * API/JSCallbackObject.cpp:
1777 (KJS::JSCallbackObject::getOwnPropertySlot):
1778 (KJS::JSCallbackObject::put):
1779 (KJS::JSCallbackObject::deleteProperty):
1780 (KJS::JSCallbackObject::getPropertyList):
1781 (KJS::JSCallbackObject::toBoolean):
1782 (KJS::JSCallbackObject::toNumber):
1783 (KJS::JSCallbackObject::toString):
1784 * API/JSClassRef.cpp:
1786 * API/JSContextRef.cpp:
1788 (JSContextSetException):
1789 * API/JSContextRef.h:
1791 (JSNodePrototype_class):
1794 (JSNodeListPrototype_class):
1796 * API/JSObjectRef.cpp:
1797 (JSObjectGetProperty):
1798 (JSObjectGetPrivate):
1799 (JSObjectSetPrivate):
1800 (JSObjectCallAsFunction):
1801 (JSObjectCallAsConstructor):
1802 (JSPropertyEnumeratorGetNext):
1803 * API/JSObjectRef.h:
1804 * API/JSStringBufferRef.cpp:
1805 (JSStringBufferCreateCF):
1806 * API/JSStringBufferRef.h:
1807 * API/JSValueRef.cpp:
1808 (JSValueIsInstanceOf):
1814 (MyObject_hasProperty):
1815 (MyObject_setProperty):
1816 (MyObject_deleteProperty):
1817 (MyObject_getPropertyList):
1818 (MyObject_convertToType):
1821 * JavaScriptCore.exp:
1823 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1827 - Fixed a few crashes resulting from NULL parameters to JSClassCreate.
1829 * API/JSClassRef.cpp:
1832 * API/testapi.c: Added test for NULL parameters.
1835 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1837 Reviewed by John, mocked by Darin.
1839 - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as
1840 "this," since "this" must be an object.
1842 * API/JSContextRef.cpp:
1844 * API/JSContextRef.h:
1846 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1853 * JavaScriptCore.xcodeproj/project.pbxproj:
1855 2006-07-05 Geoffrey Garen <ggaren@apple.com>
1859 Renamed JSCharBufferRef, which was universally unpopular, to JSStringBufferRef,
1860 which, hopefully, will be less unpopular.
1866 * API/JSCallbackObject.cpp:
1867 (KJS::JSCallbackObject::getOwnPropertySlot):
1868 (KJS::JSCallbackObject::put):
1869 (KJS::JSCallbackObject::deleteProperty):
1870 (KJS::JSCallbackObject::staticValueGetter):
1871 (KJS::JSCallbackObject::callbackGetter):
1872 * API/JSCharBufferRef.cpp: Removed.
1873 * API/JSCharBufferRef.h: Removed.
1874 * API/JSContextRef.cpp:
1877 * API/JSContextRef.h:
1879 (JSNodePrototype_appendChild):
1880 (JSNode_getNodeType):
1881 (JSNode_getChildNodes):
1882 (JSNode_getFirstChild):
1884 (JSNodeList_length):
1885 (JSNodeList_getProperty):
1886 * API/JSObjectRef.cpp:
1887 (JSFunctionMakeWithBody):
1888 (JSObjectGetDescription):
1889 (JSObjectHasProperty):
1890 (JSObjectGetProperty):
1891 (JSObjectSetProperty):
1892 (JSObjectDeleteProperty):
1893 (JSPropertyEnumeratorGetNext):
1894 (JSPropertyListAdd):
1895 * API/JSObjectRef.h:
1896 * API/JSStringBufferRef.cpp: Added.
1898 (JSStringBufferCreate):
1899 (JSStringBufferCreateUTF8):
1900 (JSStringBufferRetain):
1901 (JSStringBufferRelease):
1902 (JSValueCopyStringValue):
1903 (JSStringBufferGetLength):
1904 (JSStringBufferGetCharactersPtr):
1905 (JSStringBufferGetCharacters):
1906 (JSStringBufferGetMaxLengthUTF8):
1907 (JSStringBufferGetCharactersUTF8):
1908 (JSStringBufferIsEqual):
1909 (JSStringBufferIsEqualUTF8):
1910 (JSStringBufferCreateWithCFString):
1911 (CFStringCreateWithJSStringBuffer):
1912 * API/JSStringBufferRef.h: Added.
1914 * API/JavaScriptCore.h:
1919 (assertEqualsAsUTF8String):
1920 (assertEqualsAsCharactersPtr):
1921 (assertEqualsAsCharacters):
1922 (MyObject_hasProperty):
1923 (MyObject_getProperty):
1924 (MyObject_setProperty):
1925 (MyObject_deleteProperty):
1926 (MyObject_getPropertyList):
1927 (print_callAsFunction):
1928 (myConstructor_callAsConstructor):
1930 * JavaScriptCore.exp:
1931 * JavaScriptCore.xcodeproj/project.pbxproj:
1933 2006-07-05 Geoffrey Garen <ggaren@apple.com>
1937 Moved some code around for more logical file separation.
1940 * API/JSContextRef.h:
1941 * API/JSObjectRef.cpp:
1942 * API/JSValueRef.cpp:
1946 2006-07-03 Geoffrey Garen <ggaren@apple.com>
1950 Implemented JSFunctionMakeWithBody, which parses a script as a function body
1951 in the global scope, and returns the resulting anonymous function.
1953 I also removed private data from JSCallbackFunction. It never worked,
1954 since JSCallbackFunction doesn't inherit from JSCallbackObject.
1956 * API/JSCallbackConstructor.cpp: Removed.
1957 * API/JSCallbackConstructor.h: Removed.
1958 * API/JSCallbackFunction.cpp:
1959 (KJS::JSCallbackFunction::JSCallbackFunction):
1960 (KJS::JSCallbackFunction::implementsConstruct):
1961 (KJS::JSCallbackFunction::construct):
1962 (KJS::JSCallbackFunction::implementsCall):
1963 (KJS::JSCallbackFunction::callAsFunction):
1964 * API/JSCallbackFunction.h:
1965 * API/JSCallbackObject.cpp:
1966 (KJS::JSCallbackObject::staticFunctionGetter):
1967 * API/JSObjectRef.cpp:
1969 (JSFunctionMakeWithCallbacks):
1970 * API/JSObjectRef.h:
1976 * JavaScriptCore.exp: Programmatically added all symbols exported by
1977 API object files, and sorted results
1978 * JavaScriptCore.xcodeproj/project.pbxproj:
1980 2006-07-03 Geoffrey Garen <ggaren@apple.com>
1984 - Return syntax error in JSCheckSyntax through a JSValueRef* exception
1988 * API/JSContextRef.cpp:
1992 * JavaScriptCore.exp:
1993 * kjs/interpreter.cpp:
1994 (KJS::Interpreter::checkSyntax):
1995 * kjs/interpreter.h:
1997 2006-07-04 Darin Adler <darin@apple.com>
2001 * wtf/MathExtras.h: Oops. Added missing #endif.
2003 2006-07-04 Bjoern Graf <bjoern.graf@gmail.com>
2006 Tweaked a bit by Darin.
2008 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9678
2009 work around MSVCRT's fmod function returning NaN for fmod(x, infinity) instead of x
2011 * wtf/MathExtras.h: Added include of <float.h>.
2012 (isinf): Fix to return false for NAN.
2013 (wtf_fmod): Added. An inline that works around the bug.
2016 * kjs/number_object.cpp:
2017 * kjs/operations.cpp:
2019 Added includes of MathExtras.h to all files using fmod.
2021 * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode 2.3 have its way with
2024 2006-07-01 Geoffrey Garen <ggaren@apple.com>
2028 - Refined value conversions in the API:
2029 - failed toNumber returns NaN
2030 - failed toObject returns NULL
2031 - failed toString returns empty string
2033 - Refined excpetion handling in the API:
2034 - failed value conversions do not throw exceptions
2035 - uncaught exceptions in JSEvaluate, JSObjectCallAsFunction, and
2036 JSObjectCallAsConstructor are returned through a JSValueRef* exception
2038 - removed JSContextHasException, because JSContextGetException does
2042 * API/JSCharBufferRef.cpp:
2043 (JSValueCopyStringValue):
2044 * API/JSContextRef.cpp:
2046 * API/JSContextRef.h:
2047 * API/JSNodeList.c: Added test code demonstrating how you would use
2048 toNumber, and why you probably don't need toUInt32, etc.
2049 (JSNodeListPrototype_item):
2050 (JSNodeList_getProperty):
2051 * API/JSObjectRef.cpp:
2053 (JSObjectCallAsFunction):
2054 (JSObjectCallAsConstructor):
2055 * API/JSObjectRef.h:
2056 * API/JSValueRef.cpp:
2062 (main): Added tests for new rules, and call to JSGCProtect to fix Intel
2064 * JavaScriptCore.exp:
2066 2006-07-03 Darin Adler <darin@apple.com>
2068 - Rolled out HashMap implementation of NPRuntime, at least temporarily.
2070 Fixes hang in the bindings section of layout tests seen on the
2073 This code was using HashMap<const char*, PrivateIdentifier*>.
2074 But that hashes based on pointer identity, not string value.
2075 The default hash for any pointer type is to hash based on the pointer.
2076 And WTF doesn't currently have a string hash for char*.
2077 We'll need to fix that before re-landing this patch.
2079 (Formatting was also incorrect -- extra spaces in parentheses.)
2081 * bindings/npruntime.cpp: Rolled out last change.
2083 2006-07-02 Justin Haygood <jhaygood@spsu.edu>
2085 Reviewed, tweaked, landed by ggaren.
2087 - Port NPRuntime from CFDictionary to HashMap.
2089 * bindings/npruntime.cpp:
2090 (getStringIdentifierDictionary):
2091 (getIntIdentifierDictionary):
2092 (_NPN_GetStringIdentifier):
2093 (_NPN_GetIntIdentifier):
2094 * bindings/npruntime.h:
2096 2006-07-01 Geoffrey Garen <ggaren@apple.com>
2100 - Fixed <rdar://problem/4611197> REGRESSION: Liveconnect with Java test
2101 fails at http://www-sor.inria.fr/~dedieu/notes/liveconnect/simple_example.html
2103 * JavaScriptCore.exp: Export symbols used by liveconnect
2105 2006-06-29 Geoffrey Garen <ggaren@apple.com>
2109 - Phase 2 in the JS API.
2111 - Added support for specifying static tables of values -- this should
2112 obviate the need for using complicated callbacks for most lookups.
2114 - API objects are now created with classes (JSClassRef) -- in order to support
2115 static values, and in order to prevent API objects from storing their
2116 data inline, and thus falling into the oversized (read: slow and prone to
2117 giving Maciej the frowny face) heap.
2119 - Added two specialized JSObject subclasses -- JSCallbackFunction and JSCallbackConstructor --
2120 to allow JSFunctionMake and JSConstructorMake to continue to work with
2121 the new class model. Another solution to this problem would be to create
2122 a custom class object for each function and constructor you make. This
2123 solution is more code but also more efficient.
2125 - Substantially beefed up the minidom example to demonstrate and test a
2126 lot of these techniques. Its output is still pretty haphazard, though.
2128 - Gave the <kjs/ preface to some includes -- I'm told this matters to
2129 building on some versions of Linux.
2131 - Implemented JSValueIsInstanceOf and JSValueIsObjectOfClass
2133 - Removed GetDescription callback. Something in the class datastructure
2134 should take care of this.
2137 * API/JSCallbackConstructor.cpp: Added.
2139 (KJS::JSCallbackConstructor::JSCallbackConstructor):
2140 (KJS::JSCallbackConstructor::implementsConstruct):
2141 (KJS::JSCallbackConstructor::construct):
2142 (KJS::JSCallbackConstructor::setPrivate):
2143 (KJS::JSCallbackConstructor::getPrivate):
2144 * API/JSCallbackConstructor.h: Added.
2145 (KJS::JSCallbackConstructor::classInfo):
2146 * API/JSCallbackFunction.cpp: Added.
2148 (KJS::JSCallbackFunction::JSCallbackFunction):
2149 (KJS::JSCallbackFunction::implementsCall):
2150 (KJS::JSCallbackFunction::callAsFunction):
2151 (KJS::JSCallbackFunction::setPrivate):
2152 (KJS::JSCallbackFunction::getPrivate):
2153 * API/JSCallbackFunction.h: Added.
2154 (KJS::JSCallbackFunction::classInfo):
2155 * API/JSCallbackObject.cpp:
2157 (KJS::JSCallbackObject::JSCallbackObject):
2158 (KJS::JSCallbackObject::init):
2159 (KJS::JSCallbackObject::~JSCallbackObject):
2160 (KJS::JSCallbackObject::className):
2161 (KJS::JSCallbackObject::getOwnPropertySlot):
2162 (KJS::JSCallbackObject::put):
2163 (KJS::JSCallbackObject::deleteProperty):
2164 (KJS::JSCallbackObject::implementsConstruct):
2165 (KJS::JSCallbackObject::construct):
2166 (KJS::JSCallbackObject::implementsCall):
2167 (KJS::JSCallbackObject::callAsFunction):
2168 (KJS::JSCallbackObject::getPropertyList):
2169 (KJS::JSCallbackObject::toBoolean):
2170 (KJS::JSCallbackObject::toNumber):
2171 (KJS::JSCallbackObject::toString):
2172 (KJS::JSCallbackObject::inherits):
2173 (KJS::JSCallbackObject::staticValueGetter):
2174 (KJS::JSCallbackObject::staticFunctionGetter):
2175 (KJS::JSCallbackObject::callbackGetter):
2176 * API/JSCallbackObject.h:
2177 * API/JSCharBufferRef.cpp:
2178 * API/JSClassRef.cpp: Added.
2182 * API/JSClassRef.h: Added.
2183 (StaticValueEntry::StaticValueEntry):
2184 (StaticFunctionEntry::StaticFunctionEntry):
2185 (__JSClass::__JSClass):
2186 * API/JSContextRef.cpp:
2189 * API/JSContextRef.h:
2190 * API/JSNode.c: Added.
2191 (JSNodePrototype_appendChild):
2192 (JSNodePrototype_removeChild):
2193 (JSNodePrototype_replaceChild):
2194 (JSNodePrototype_class):
2195 (JSNode_getNodeType):
2196 (JSNode_getChildNodes):
2197 (JSNode_getFirstChild):
2203 * API/JSNode.h: Added.
2204 * API/JSNodeList.c: Added.
2205 (JSNodeListPrototype_item):
2206 (JSNodeListPrototype_class):
2207 (JSNodeList_length):
2208 (JSNodeList_getProperty):
2209 (JSNodeList_finalize):
2211 (JSNodeList_prototype):
2213 * API/JSNodeList.h: Added.
2214 * API/JSObjectRef.cpp:
2217 (JSConstructorMake):
2218 (__JSPropertyEnumerator::__JSPropertyEnumerator):
2219 (JSObjectCreatePropertyEnumerator):
2220 (JSPropertyEnumeratorGetNext):
2221 (JSPropertyEnumeratorRetain):
2222 (JSPropertyEnumeratorRelease):
2223 * API/JSObjectRef.h:
2224 (__JSObjectCallbacks::):
2225 * API/JSValueRef.cpp:
2226 (JSValueIsObjectOfClass):
2227 (JSValueIsInstanceOf):
2229 * API/Node.c: Added.
2233 (Node_replaceChild):
2236 * API/Node.h: Added.
2237 * API/NodeList.c: Added.
2243 * API/NodeList.h: Added.
2247 (createStringWithContentsOfFile):
2250 (assertEqualsAsCharacters):
2251 (MyObject_getProperty):
2253 (myConstructor_callAsConstructor):
2256 * JavaScriptCore.xcodeproj/project.pbxproj:
2258 2006-06-26 Kevin Ollivier <kevino@theolliviers.com>
2260 Reviewed and tweaked by Darin.
2262 - Compile fixes for wx port / gcc 4.0.2
2264 * kjs/array_object.cpp:
2265 Added missing headers.
2268 gcc needs class prototypes before defining those classes as friend classes
2270 2006-06-30 Mike Emmel <mike.emmel@gmail.com>
2274 Compilation fixes for Linux/Gdk.
2276 * JavaScriptCore/kjs/interpreter.cpp: added include of signal.h
2277 * JavaScriptCore/kjs/ExecState.h: added missing class declaration
2278 * JavaScriptCore/kjs/ExecState.cpp: case wrong on include of context.h
2279 * JavaScriptCore/JavaScriptCoreSources.bkl: added Context.cpp and ExecState.cpp
2281 === Safari-521.14 ===
2283 2006-06-29 Maciej Stachowiak <mjs@apple.com>
2287 - add headerdoc comments to some of the new JS API headers
2292 2006-06-28 Timothy Hatcher <timothy@apple.com>
2294 Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
2296 * JavaScriptCore.xcodeproj/project.pbxproj:
2298 2006-06-27 Timothy Hatcher <timothy@apple.com>
2302 <rdar://problem/4448350> Deprecated ObjC language API used in JavaScriptCore, WebCore, WebKit and WebBrowser
2304 Switch to the new ObjC 2 API, ifdefed the old code around OBJC_API_VERSION so it still works on Tiger.
2305 Removed the use of the old stringWithCString, switched to the new Tiger version that accepts an encoding.
2306 Lots of code style cleanup.
2308 * JavaScriptCore.xcodeproj/project.pbxproj:
2309 * bindings/objc/objc_class.h:
2310 * bindings/objc/objc_class.mm:
2311 (KJS::Bindings::ObjcClass::~ObjcClass):
2312 (KJS::Bindings::_createClassesByIsAIfNecessary):
2313 (KJS::Bindings::ObjcClass::classForIsA):
2314 (KJS::Bindings::ObjcClass::name):
2315 (KJS::Bindings::ObjcClass::methodsNamed):
2316 (KJS::Bindings::ObjcClass::fieldNamed):
2317 (KJS::Bindings::ObjcClass::fallbackObject):
2318 * bindings/objc/objc_header.h:
2319 * bindings/objc/objc_instance.h:
2320 * bindings/objc/objc_instance.mm:
2321 (ObjcInstance::ObjcInstance):
2322 (ObjcInstance::~ObjcInstance):
2323 (ObjcInstance::operator=):
2324 (ObjcInstance::begin):
2325 (ObjcInstance::end):
2326 (ObjcInstance::getClass):
2327 (ObjcInstance::invokeMethod):
2328 (ObjcInstance::invokeDefaultMethod):
2329 (ObjcInstance::setValueOfField):
2330 (ObjcInstance::supportsSetValueOfUndefinedField):
2331 (ObjcInstance::setValueOfUndefinedField):
2332 (ObjcInstance::getValueOfField):
2333 (ObjcInstance::getValueOfUndefinedField):
2334 (ObjcInstance::defaultValue):
2335 (ObjcInstance::stringValue):
2336 (ObjcInstance::numberValue):
2337 (ObjcInstance::booleanValue):
2338 (ObjcInstance::valueOf):
2339 * bindings/objc/objc_runtime.h:
2340 * bindings/objc/objc_runtime.mm:
2341 (ObjcMethod::ObjcMethod):
2343 (ObjcMethod::getMethodSignature):
2344 (ObjcMethod::setJavaScriptName):
2347 (ObjcField::valueFromInstance):
2348 (convertValueToObjcObject):
2349 (ObjcField::setValueToInstance):
2350 (ObjcArray::operator=):
2351 (ObjcArray::setValueAt):
2352 (ObjcArray::valueAt):
2353 (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2354 (ObjcFallbackObjectImp::callAsFunction):
2355 (ObjcFallbackObjectImp::defaultValue):
2357 2006-06-28 Anders Carlsson <acarlsson@apple.com>
2361 http://bugzilla.opendarwin.org/show_bug.cgi?id=8636
2362 REGRESSION: JavaScript access to Java applet causes hang (_webViewURL not implemented)
2364 * bindings/jni/jni_objc.mm:
2365 (KJS::Bindings::dispatchJNICall):
2366 Just pass nil as the calling URL. This will cause the Java plugin to use the URL of the page
2367 containing the applet (which is what we used to do).
2369 2006-06-27 Timothy Hatcher <timothy@apple.com>
2373 <rdar://problem/4406785> Add an export file to TOT JavaScriptCore like the Safari-2-0-branch
2375 * JavaScriptCore.exp: Added.
2376 * JavaScriptCore.xcodeproj/project.pbxproj:
2378 2006-06-25 Geoffrey Garen <ggaren@apple.com>
2382 - Added JSConstructorMake to match JSFunctionMake, along with test code.
2384 [ I checked in the ChangeLog before without the actual files. ]
2386 * API/JSObjectRef.cpp:
2387 (JSConstructorMake):
2388 * API/JSObjectRef.h:
2390 (myConstructor_callAsConstructor):
2394 * JavaScriptCore.xcodeproj/project.pbxproj: Moved testapi.c to the testapi
2395 target -- this was an oversight in my earlier check-in.
2397 2006-06-25 Timothy Hatcher <timothy@apple.com>
2401 Bug 9574: Drosera should show inline scripts within the original HTML
2402 http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
2404 Pass the starting line number and error message to the debugger.
2407 (Debugger::sourceParsed):
2410 (KJS::GlobalFuncImp::callAsFunction):
2411 * kjs/function_object.cpp:
2412 (FunctionObjectImp::construct):
2413 * kjs/interpreter.cpp:
2414 (KJS::Interpreter::evaluate):
2416 2006-06-24 Alexey Proskuryakov <ap@nypop.com>
2418 Rubber-stamped by Eric.
2420 Add a -h (do not follow symlinks) option to ln in derived sources build script (without it,
2421 a symlink was created inside the source directory on second build).
2423 * JavaScriptCore.xcodeproj/project.pbxproj:
2425 2006-06-24 David Kilzer <ddkilzer@kilzer.net>
2427 Reviewed by Timothy.
2429 * Info.plist: Fixed copyright to include 2003-2006.
2431 2006-06-24 Alexey Proskuryakov <ap@nypop.com>
2435 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9418
2436 WebKit will not build when Space exists in path
2438 * JavaScriptCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to
2439 avoid passing paths with spaces to make.
2441 2006-06-23 Timothy Hatcher <timothy@apple.com>
2445 Adding more operator[] overloads for long and short types.
2448 (WTF::Vector::operator[]):
2450 === JavaScriptCore-521.13 ===
2452 2006-06-22 Alexey Proskuryakov <ap@nypop.com>
2456 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9539
2457 Another case error preventing build
2459 * API/JSObjectRef.cpp: Changed "identifier.h" to "Identifier.h"
2461 2006-06-22 David Kilzer <ddkilzer@kilzer.net>
2465 http://bugzilla.opendarwin.org/show_bug.cgi?id=9539
2466 Another case error preventing build
2468 * API/APICast.h: Changed "UString.h" to "ustring.h".
2470 2006-06-21 Geoffrey Garen <ggaren@apple.com>
2472 Fixed release build, fixed accidental infinite recursion due to
2473 last minute global replace gone awry.
2478 (assertEqualsAsBoolean):
2479 (assertEqualsAsNumber):
2480 (assertEqualsAsUTF8String):
2481 (assertEqualsAsCharactersPtr):
2482 * JavaScriptCore.xcodeproj/project.pbxproj:
2484 2006-06-21 Geoffrey Garen <ggaren@apple.com>
2488 - First cut at C API to JavaScript. Includes a unit test, 'testapi.c',
2489 and the outline of a test app, 'minidom.c'.
2491 Includes one change to JSC internals: Rename propList to getPropertyList and have it
2492 take its target property list by reference so that subclasses can
2493 add properties to the list before calling through to their superclasses.
2495 Also, I just ran prepare-ChangeLog in about 10 seconds, and I would like
2496 to give a shout-out to that.
2498 * API/APICast.h: Added.
2501 * API/JSBase.h: Added.
2502 * API/JSCallbackObject.cpp: Added.
2504 (KJS::JSCallbackObject::JSCallbackObject):
2505 (KJS::JSCallbackObject::~JSCallbackObject):
2506 (KJS::JSCallbackObject::className):
2507 (KJS::JSCallbackObject::getOwnPropertySlot):
2508 (KJS::JSCallbackObject::put):
2509 (KJS::JSCallbackObject::deleteProperty):
2510 (KJS::JSCallbackObject::implementsConstruct):
2511 (KJS::JSCallbackObject::construct):
2512 (KJS::JSCallbackObject::implementsCall):
2513 (KJS::JSCallbackObject::callAsFunction):
2514 (KJS::JSCallbackObject::getPropertyList):
2515 (KJS::JSCallbackObject::toBoolean):
2516 (KJS::JSCallbackObject::toNumber):
2517 (KJS::JSCallbackObject::toString):
2518 (KJS::JSCallbackObject::setPrivate):
2519 (KJS::JSCallbackObject::getPrivate):
2520 (KJS::JSCallbackObject::cachedValueGetter):
2521 (KJS::JSCallbackObject::callbackGetter):
2522 * API/JSCallbackObject.h: Added.
2523 (KJS::JSCallbackObject::classInfo):
2524 * API/JSCharBufferRef.cpp: Added.
2526 (JSCharBufferCreate):
2527 (JSCharBufferCreateUTF8):
2528 (JSCharBufferRetain):
2529 (JSCharBufferRelease):
2530 (JSValueCopyStringValue):
2531 (JSCharBufferGetLength):
2532 (JSCharBufferGetCharactersPtr):
2533 (JSCharBufferGetCharacters):
2534 (JSCharBufferGetMaxLengthUTF8):
2535 (JSCharBufferGetCharactersUTF8):
2536 (JSCharBufferIsEqual):
2537 (JSCharBufferIsEqualUTF8):
2538 (JSCharBufferCreateWithCFString):
2539 (CFStringCreateWithJSCharBuffer):
2540 * API/JSCharBufferRef.h: Added.
2541 * API/JSContextRef.cpp: Added.
2544 (JSContextGetGlobalObject):
2547 (JSContextHasException):
2548 (JSContextGetException):
2549 (JSContextClearException):
2550 (JSContextSetException):
2551 * API/JSContextRef.h: Added.
2552 * API/JSObjectRef.cpp: Added.
2556 (JSObjectGetDescription):
2557 (JSObjectGetPrototype):
2558 (JSObjectSetPrototype):
2559 (JSObjectHasProperty):
2560 (JSObjectGetProperty):
2561 (JSObjectSetProperty):
2562 (JSObjectDeleteProperty):
2563 (JSObjectGetPrivate):
2564 (JSObjectSetPrivate):
2565 (JSObjectIsFunction):
2566 (JSObjectCallAsFunction):
2567 (JSObjectIsConstructor):
2568 (JSObjectCallAsConstructor):
2569 (__JSPropertyListEnumerator::__JSPropertyListEnumerator):
2570 (JSObjectCreatePropertyEnumerator):
2571 (JSPropertyEnumeratorGetNext):
2572 (JSPropertyEnumeratorRetain):
2573 (JSPropertyEnumeratorRelease):
2574 (JSPropertyListAdd):
2575 * API/JSObjectRef.h: Added.
2576 * API/JSValueRef.cpp: Added.
2578 (JSValueIsUndefined):
2585 (JSValueIsStrictEqual):
2595 * API/JSValueRef.h: Added.
2596 * API/JavaScriptCore.h: Added.
2597 * API/minidom.c: Added.
2599 * API/minidom.html: Added.
2600 * API/minidom.js: Added.
2601 * API/testapi.c: Added.
2602 (assertEqualsAsBoolean):
2603 (assertEqualsAsNumber):
2604 (assertEqualsAsUTF8String):
2605 (assertEqualsAsCharactersPtr):
2606 (assertEqualsAsCharacters):
2607 (MyObject_initialize):
2608 (MyObject_copyDescription):
2609 (MyObject_hasProperty):
2610 (MyObject_getProperty):
2611 (MyObject_setProperty):
2612 (MyObject_deleteProperty):
2613 (MyObject_getPropertyList):
2614 (MyObject_callAsFunction):
2615 (MyObject_callAsConstructor):
2616 (MyObject_convertToType):
2617 (MyObject_finalize):
2618 (print_callAsFunction):
2620 (createStringWithContentsOfFile):
2621 * API/testapi.js: Added.
2623 * JavaScriptCore.xcodeproj/project.pbxproj:
2624 * bindings/npruntime_impl.h:
2625 * kjs/array_instance.h:
2626 * kjs/array_object.cpp:
2627 (ArrayInstance::getPropertyList):
2628 * kjs/interpreter.cpp:
2629 (KJS::Interpreter::evaluate):
2631 (ForInNode::execute):
2633 (KJS::JSObject::put):
2634 (KJS::JSObject::canPut):
2635 (KJS::JSObject::deleteProperty):
2636 (KJS::JSObject::propertyIsEnumerable):
2637 (KJS::JSObject::getPropertyAttributes):
2638 (KJS::JSObject::getPropertyList):
2640 * kjs/property_map.cpp:
2641 (KJS::PropertyMap::get):
2642 * kjs/property_map.h:
2643 * kjs/scope_chain.cpp:
2644 (KJS::ScopeChain::print):
2645 * kjs/string_object.cpp:
2646 (StringInstance::getPropertyList):
2647 * kjs/string_object.h:
2649 (KJS::UString::Rep::ref):
2651 2006-06-20 Timothy Hatcher <timothy@apple.com>
2655 Make sure we clear the exception before returning so
2656 that future calls will not fail because of an earlier
2657 exception state. Assert on entry that the WebScriptObject
2658 is working with an ExecState that dose not have an exception.
2659 Document that evaluateWebScript and callWebScriptMethod return
2660 WebUndefined when an exception is thrown.
2662 * bindings/objc/WebScriptObject.h:
2663 * bindings/objc/WebScriptObject.mm:
2664 (-[WebScriptObject callWebScriptMethod:withArguments:]):
2665 (-[WebScriptObject evaluateWebScript:]):
2666 (-[WebScriptObject setValue:forKey:]):
2667 (-[WebScriptObject valueForKey:]):
2668 (-[WebScriptObject removeWebScriptKey:]):
2669 (-[WebScriptObject webScriptValueAtIndex:]):
2670 (-[WebScriptObject setWebScriptValueAtIndex:value:]):
2672 2006-06-19 Anders Carlsson <acarlsson@apple.com>
2676 * kjs/interpreter.cpp:
2677 (KJS::TimeoutChecker::pauseTimeoutCheck):
2678 (KJS::TimeoutChecker::resumeTimeoutCheck):
2679 Fix argument order in setitimer calls.
2681 2006-06-18 Anders Carlsson <acarlsson@apple.com>
2685 * kjs/interpreter.cpp:
2686 (KJS::TimeoutChecker::pauseTimeoutCheck):
2687 Do nothing if the timeout check hasn't been started.
2689 (KJS::TimeoutChecker::resumeTimeoutCheck):
2690 Do nothing if the timeout check hasn't been started.
2691 Use the right signal handler when unblocking.
2693 (KJS::Interpreter::handleTimeout):
2694 pause/resume the timeout check around the call to
2695 shouldInterruptScript().
2697 2006-06-16 Ben Goodger <beng@google.com>
2701 http://bugzilla.opendarwin.org/show_bug.cgi?id=9491
2702 Windows build breaks in interpreter.cpp
2704 * kjs/interpreter.cpp
2705 (KJS::TimeoutChecker::pauseTimeoutCheck):
2706 (KJS::TimeoutChecker::resumeTimeoutCheck):
2707 Make sure to only assert equality with s_executingInterpreter when it
2708 is being used (i.e. when HAVE(SYS_TIME_H) == true)
2710 2006-06-17 David Kilzer <ddkilzer@kilzer.net>
2714 http://bugzilla.opendarwin.org/show_bug.cgi?id=9477
2715 REGRESSION: fast/dom/replaceChild.html crashes on WebKit ToT in debug build
2718 (KJS::FunctionImp::callAsFunction): Refetch the debugger after executing the function
2719 in case the WebFrame it was running in has since been destroyed.
2721 2006-06-17 David Kilzer <ddkilzer@kilzer.net>
2725 http://bugzilla.opendarwin.org/show_bug.cgi?id=9476
2726 REGRESSION: Reproducible crash after closing window after viewing
2727 css2.1/t0803-c5501-imrgn-t-00-b-ag.html
2730 (Debugger::detach): Call setDebugger(0) for all interpreters removed from
2731 the 'attached to a debugger' list.
2733 2006-06-17 Anders Carlsson <acarlsson@apple.com>
2735 Reviewed by Maciej and Geoff.
2737 http://bugzilla.opendarwin.org/show_bug.cgi?id=7080
2738 Provide some way to stop a JavaScript infinite loop
2742 Add Interrupted completion type.
2745 (KJS::FunctionImp::callAsFunction):
2746 (KJS::GlobalFuncImp::callAsFunction):
2747 Only set the exception on the new ExecState if the current one has had one.
2749 * kjs/interpreter.cpp:
2750 (KJS::TimeoutChecker::startTimeoutCheck):
2751 (KJS::TimeoutChecker::stopTimeoutCheck):
2752 (KJS::TimeoutChecker::alarmHandler):
2753 (KJS::TimeoutChecker::pauseTimeoutCheck):
2754 (KJS::TimeoutChecker::resumeTimeoutCheck):
2755 New TimeoutChecker class which handles setting Interpreter::m_timedOut flag after a given
2756 period of time. This currently only works on Unix platforms where setitimer and signals are used.
2758 (KJS::Interpreter::Interpreter):
2759 Initialize new member variables.
2761 (KJS::Interpreter::~Interpreter):
2762 Destroy the timeout checker.
2764 (KJS::Interpreter::startTimeoutCheck):
2765 (KJS::Interpreter::stopTimeoutCheck):
2766 (KJS::Interpreter::pauseTimeoutCheck):
2767 (KJS::Interpreter::resumeTimeoutCheck):
2768 Call the timeout checker.
2770 (KJS::Interpreter::handleTimeout):
2771 Called on timeout. Resets the m_timedOut flag and calls shouldInterruptScript.
2773 * kjs/interpreter.h:
2774 (KJS::Interpreter::setTimeoutTime):
2775 New function for setting the timeout time.
2777 (KJS::Interpreter::shouldInterruptScript):
2778 New function. The idea is that this should be overridden by subclasses in order to for example
2779 pop up a dialog asking the user if the script should be interrupted.
2781 (KJS::Interpreter::checkTimeout):
2782 New function which checks the m_timedOut flag and calls handleTimeout if it's set.
2785 (DoWhileNode::execute):
2786 (WhileNode::execute):
2788 Call Interpreter::checkTimeout after each iteration of the loop.
2790 2006-06-15 Timothy Hatcher <timothy@apple.com>
2792 Reviewed by Geoff and Darin.
2794 Prefer the DWARF debugging symbols format for use in Xcode 2.3.
2796 * JavaScriptCore.xcodeproj/project.pbxproj:
2798 2006-06-14 Geoffrey Garen <ggaren@apple.com>
2802 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9438
2803 Someone broke ToT: cannot build
2805 * JavaScriptCore.xcodeproj/project.pbxproj:
2806 * bindings/runtime_root.h: Changed "Interpreter.h" to "interpreter.h"
2808 2006-06-12 Geoffrey Garen <ggaren@apple.com>
2812 * bindings/objc/WebScriptObject.mm:
2813 (+[WebScriptObject throwException:]): Restore assignment I accidentally
2814 deleted in previous commit
2816 2006-06-12 Geoffrey Garen <ggaren@apple.com>
2818 Reviewed by TimO, Maciej.
2820 - Merged InterpreterImp code into Interpreter, which implements
2821 all interpreter functionality now. This is part of my continuing quest
2822 to create an external notion of JS "execution context" that is unified and simple --
2823 something to replace the mix of Context, ContextImp, ExecState, Interpreter,
2824 InterpreterImp, and JSRun.
2826 All tests pass. Leaks test has not regressed from its baseline ~207 leaks
2827 with ~3460 leaked nodes.
2829 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2830 * JavaScriptCore.xcodeproj/project.pbxproj:
2831 * bindings/NP_jsobject.cpp:
2832 * bindings/objc/WebScriptObject.mm:
2833 (+[WebScriptObject throwException:]):
2834 * bindings/runtime_root.cpp:
2835 * bindings/runtime_root.h:
2837 (KJS::Context::Context):
2838 * kjs/ExecState.cpp: Added.
2839 (KJS::ExecState::lexicalInterpreter):
2840 * kjs/ExecState.h: Added.
2841 (KJS::ExecState::dynamicInterpreter):
2842 * kjs/SavedBuiltins.h: Added.
2843 * kjs/bool_object.cpp:
2844 (BooleanPrototype::BooleanPrototype):
2845 * kjs/collector.cpp:
2846 (KJS::Collector::collect):
2847 (KJS::Collector::numInterpreters):
2853 (KJS::FunctionImp::callAsFunction):
2854 (KJS::GlobalFuncImp::callAsFunction):
2855 * kjs/function_object.cpp:
2856 (FunctionObjectImp::construct):
2859 * kjs/interpreter.cpp:
2860 (KJS::interpreterMap):
2861 (KJS::Interpreter::Interpreter):
2862 (KJS::Interpreter::init):
2863 (KJS::Interpreter::~Interpreter):
2864 (KJS::Interpreter::globalObject):
2865 (KJS::Interpreter::initGlobalObject):
2866 (KJS::Interpreter::globalExec):
2867 (KJS::Interpreter::checkSyntax):
2868 (KJS::Interpreter::evaluate):
2869 (KJS::Interpreter::builtinObject):
2870 (KJS::Interpreter::builtinFunction):
2871 (KJS::Interpreter::builtinArray):
2872 (KJS::Interpreter::builtinBoolean):
2873 (KJS::Interpreter::builtinString):
2874 (KJS::Interpreter::builtinNumber):
2875 (KJS::Interpreter::builtinDate):
2876 (KJS::Interpreter::builtinRegExp):
2877 (KJS::Interpreter::builtinError):
2878 (KJS::Interpreter::builtinObjectPrototype):
2879 (KJS::Interpreter::builtinFunctionPrototype):
2880 (KJS::Interpreter::builtinArrayPrototype):
2881 (KJS::Interpreter::builtinBooleanPrototype):
2882 (KJS::Interpreter::builtinStringPrototype):
2883 (KJS::Interpreter::builtinNumberPrototype):
2884 (KJS::Interpreter::builtinDatePrototype):
2885 (KJS::Interpreter::builtinRegExpPrototype):
2886 (KJS::Interpreter::builtinErrorPrototype):
2887 (KJS::Interpreter::builtinEvalError):
2888 (KJS::Interpreter::builtinRangeError):
2889 (KJS::Interpreter::builtinReferenceError):
2890 (KJS::Interpreter::builtinSyntaxError):
2891 (KJS::Interpreter::builtinTypeError):
2892 (KJS::Interpreter::builtinURIError):
2893 (KJS::Interpreter::builtinEvalErrorPrototype):
2894 (KJS::Interpreter::builtinRangeErrorPrototype):
2895 (KJS::Interpreter::builtinReferenceErrorPrototype):
2896 (KJS::Interpreter::builtinSyntaxErrorPrototype):
2897 (KJS::Interpreter::builtinTypeErrorPrototype):
2898 (KJS::Interpreter::builtinURIErrorPrototype):
2899 (KJS::Interpreter::mark):
2900 (KJS::Interpreter::interpreterWithGlobalObject):
2901 (KJS::Interpreter::saveBuiltins):
2902 (KJS::Interpreter::restoreBuiltins):
2903 * kjs/interpreter.h:
2904 (KJS::Interpreter::setCompatMode):
2905 (KJS::Interpreter::compatMode):
2906 (KJS::Interpreter::firstInterpreter):
2907 (KJS::Interpreter::nextInterpreter):
2908 (KJS::Interpreter::prevInterpreter):
2909 (KJS::Interpreter::debugger):
2910 (KJS::Interpreter::setDebugger):
2911 (KJS::Interpreter::setContext):
2912 (KJS::Interpreter::context):
2914 (StatementNode::hitStatement):
2915 (RegExpNode::evaluate):
2918 2006-06-12 Geoffrey Garen <ggaren@apple.com>
2922 - Have *.lut.h files #include lookup.h to eliminate surprising header
2923 include order dependency.
2925 * DerivedSources.make:
2926 * kjs/array_object.cpp:
2927 * kjs/date_object.cpp:
2928 * kjs/date_object.h:
2929 (KJS::DateProtoFunc::):
2931 * kjs/math_object.cpp:
2932 * kjs/number_object.cpp:
2933 * kjs/regexp_object.cpp:
2934 * kjs/string_object.cpp:
2936 2006-06-10 Geoffrey Garen <ggaren@apple.com>
2938 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8515
2939 Linux porting compile bug
2941 Fix by Mike Emmel, Reviewed by Darin.
2943 * JavaScriptCoreSources.bkl:
2947 2006-06-09 Geoffrey Garen <ggaren@apple.com>
2949 Build fix -- I think :).
2951 * JavaScriptCore.xcodeproj/project.pbxproj:
2954 2006-06-09 Geoffrey Garen <ggaren@apple.com>
2956 Reviewed by Eric (yay!).
2958 - Removed Context wrapper for ContextImp, renamed ContextImp to Context,
2959 split Context into its own file -- Context.cpp -- renamed _var to m_var,
2960 change ' *' to '* '.
2962 * JavaScriptCore.xcodeproj/project.pbxproj:
2963 * kjs/Context.cpp: Added.
2964 (KJS::Context::Context):
2965 (KJS::Context::~Context):
2966 (KJS::Context::mark):
2968 (KJS::Context::scopeChain):
2969 (KJS::Context::variableObject):
2970 (KJS::Context::setVariableObject):
2971 (KJS::Context::thisValue):
2972 (KJS::Context::callingContext):
2973 (KJS::Context::activationObject):
2974 (KJS::Context::currentBody):
2975 (KJS::Context::function):
2976 (KJS::Context::arguments):
2977 (KJS::Context::pushScope):
2978 (KJS::Context::seenLabels):
2980 (KJS::FunctionImp::callAsFunction):
2981 (KJS::FunctionImp::processParameters):
2982 (KJS::FunctionImp::argumentsGetter):
2983 (KJS::GlobalFuncImp::callAsFunction):
2985 (KJS::InterpreterImp::evaluate):
2987 (KJS::InterpreterImp::setContext):
2988 (KJS::InterpreterImp::context):
2989 * kjs/interpreter.cpp:
2990 * kjs/interpreter.h:
2991 (KJS::ExecState::context):
2992 (KJS::ExecState::ExecState):
2996 (ThisNode::evaluate):
2997 (ResolveNode::evaluate):
2998 (FunctionCallResolveNode::evaluate):
2999 (PostfixResolveNode::evaluate):
3000 (DeleteResolveNode::evaluate):
3001 (TypeOfResolveNode::evaluate):
3002 (PrefixResolveNode::evaluate):
3003 (AssignResolveNode::evaluate):
3004 (VarDeclNode::evaluate):
3005 (VarDeclNode::processVarDecls):
3006 (DoWhileNode::execute):
3007 (WhileNode::execute):
3009 (ForInNode::execute):
3010 (ContinueNode::execute):
3011 (BreakNode::execute):
3012 (ReturnNode::execute):
3013 (WithNode::execute):
3014 (SwitchNode::execute):
3015 (LabelNode::execute):
3017 (FuncDeclNode::processFuncDecl):
3018 (FuncExprNode::evaluate):
3020 2006-06-07 Geoffrey Garen <ggaren@apple.com>
3022 Removed API directory I prematurely/accidentally added.
3026 2006-06-05 Mitz Pettel <opendarwin.org@mitzpettel.com>
3028 Reviewed and landed by Geoff.
3030 - fix a regression in ecma_3/String/regress-104375.js
3032 * kjs/string_object.cpp:
3033 (substituteBackreferences): If a 2-digit back reference is out of range,
3034 parse it as a 1-digit reference (followed by the other digit). This matches
3037 2006-06-05 Geoffrey Garen <ggaren@apple.com>
3040 Darin already reviewed this change on the branch. See <rdar://problem/4317701>.
3042 - Fixed <rdar://problem/4291345> PCRE overflow in Safari JavaScriptCore
3044 No test case because there's no behavior change.
3046 * pcre/pcre_compile.c:
3047 (read_repeat_counts): Check for integer overflow / out of bounds
3049 2006-06-05 Geoffrey Garen <ggaren@apple.com>
3053 - Changed CString length from int to size_t. We sould probably do this
3054 for UString, too. (Darin, if you're reading this: Maciej said so.)
3059 (KJS::CString::CString):
3062 (KJS::CString::size):
3064 2006-06-04 Geoffrey Garen <ggaren@apple.com>
3068 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9304
3069 Minor cleanup in JavaScriptCore
3071 * kjs/value.h: Removed redundant declarations
3073 2006-06-04 Darin Adler <darin@apple.com>
3077 - changed deleteAllValues so it can work on "const" collections
3078 Deleting the values affects the values, not the pointers in the
3079 collection, so it's legitimate to do it to a const collection,
3080 and a case of that actually came up in the XPath code.
3083 (WTF::deleteAllPairSeconds): Use const iterators.
3084 (WTF::deleteAllValues): Take const HashMap reference as a parameter.
3086 (WTF::deleteAllValues): Take const HashSet reference as a parameter,
3087 and use const iterators.
3089 (WTF::deleteAllValues): Take const Vector reference as a parameter.
3091 - added more functions that are present in <math.h> on some platforms,
3092 but not on others; moved here from various files in WebCore
3103 2006-06-02 Mitz Pettel <opendarwin.org@mitzpettel.com>
3107 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9234
3108 Implement $&, $' and $` replacement codes in String.prototype.replace
3110 Test: fast/js/string-replace-3.html
3112 * kjs/string_object.cpp:
3113 (substituteBackreferences): Added support for $& (matched substring),
3114 $` (everything preceding matched substring), $' (everything following
3115 matched substring) and 2-digit back references, and cleaned up a little.
3117 2006-06-02 Adele Peterson <adele@apple.com>
3121 Set incremental linking to no. This seems to fix a build problem I was seeing
3122 where dftables couldn't find a dll.
3124 * JavaScriptCore.vcproj/dftables/dftables.vcproj:
3126 2006-05-26 Steve Falkenburg <sfalken@apple.com>
3130 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3132 === JavaScriptCore-521.11 ===
3134 2006-05-24 Geoffrey Garen <ggaren@apple.com>
3138 - JSC half of fix for <rdar://problem/4557926> TOT REGRESSSION: Crash
3139 occurs when attempting to view image in slideshow mode at
3140 http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute
3141 (KJS::ExecState*) + 312)
3143 On alternate threads, DOMObjects remain in the
3144 ScriptInterpreter's cache because they're not collected. So, they
3145 need an opportunity to mark their children.
3147 I'm not particularly happy with this solution because it fails to
3148 resolve many outstanding issues with the DOM object cache. Since none
3149 of those issues is a crasher or a serious compatibility concern,
3150 and since the behavior of other browsers is not much to go on in this
3151 case, I've filed <rdar://problem/4561439> about that, and I'm moving on
3154 * JavaScriptCore.xcodeproj/project.pbxproj:
3155 * kjs/collector.cpp:
3156 (KJS::Collector::collect):
3158 (KJS::InterpreterImp::mark):
3160 * kjs/interpreter.cpp:
3161 (KJS::Interpreter::mark):
3162 * kjs/interpreter.h:
3164 === JavaScriptCore-521.10 ===
3166 2006-05-22 Timothy Hatcher <timothy@apple.com>
3168 Reviewed by Eric, Kevin and Geoff.
3170 Merge open source build fixes. <rdar://problem/4555500>
3172 * kjs/collector.cpp: look at the rsp register in x86_64
3173 (KJS::Collector::markOtherThreadConservatively):
3174 * wtf/Platform.h: add x86_64 to the platform list
3176 2006-05-19 Anders Carlsson <acarlsson@apple.com>
3180 http://bugzilla.opendarwin.org/show_bug.cgi?id=8993
3181 Support function declaration in case statements
3183 * kjs/grammar.y: Get rid of StatementList and use SourceElements instead.
3186 (CaseClauseNode::evalStatements):
3187 (CaseClauseNode::processVarDecls):
3188 (CaseClauseNode::processFuncDecl):
3189 (ClauseListNode::processFuncDecl):
3190 (CaseBlockNode::processFuncDecl):
3191 (SwitchNode::processFuncDecl):
3193 (KJS::CaseClauseNode::CaseClauseNode):
3194 (KJS::ClauseListNode::ClauseListNode):
3195 (KJS::ClauseListNode::getClause):
3196 (KJS::ClauseListNode::getNext):
3197 (KJS::ClauseListNode::releaseNext):
3198 (KJS::SwitchNode::SwitchNode):
3199 Add processFuncDecl for the relevant nodes.
3201 * kjs/nodes2string.cpp:
3202 (CaseClauseNode::streamTo):
3203 next got renamed to source.
3205 2006-05-17 George Staikos <staikos@kde.org>
3207 Reviewed by Maciej, Alexey, and Eric.
3209 * pcre/pcre_compile.c:
3212 * wtf/UnusedParam.h:
3213 Use /**/ in .c files to compile with non-C99 and non-GCC compilers.
3216 Change include to <wtf/HashTraits.h> from "HashTraits.h" to avoid -I
3218 * wtf/unicode/qt4/UnicodeQt4.h:
3219 Use correct parentheses and correct mask for utf-32 support.
3221 2006-05-17 Alexey Proskuryakov <ap@nypop.com>
3225 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8870
3226 Crash typing in Yahoo auto-complete widget.
3228 Test: fast/js/regexp-stack-overflow.html
3230 * pcre/pcre-config.h: Define NO_RECURSE.
3232 2006-05-16 George Staikos <staikos@kde.org>
3236 Fix some warnings and strict compilation errors.
3241 2006-05-15 Alexey Proskuryakov <ap@nypop.com>
3243 * make-generated-sources.sh: Changed to be executable and removed
3244 text in the file generated by "svn diff".
3246 2006-05-15 Geoffrey Garen <ggaren@apple.com>
3250 - Fixed <rdar://problem/4534904> please do not treat "debugger" as
3251 a reserved word while parsing JavaScript (and other ECMA reserved
3256 http://bugzilla.opendarwin.org/show_bug.cgi?id=6179
3257 We treat "char" as a reserved word in JavaScript and firefox/IE do
3260 (1) I unreserved most of the spec's "future reserved words" because
3261 they're not reserved in IE or FF. (Most, but not all, because IE
3262 somewhat randomly *does* reserve a few of them.)
3263 (2) I made 'debugger' a legitimate statement that acts like an empty
3264 statement because FF and IE support it.
3267 * kjs/keywords.table:
3269 2006-05-15 Tim Omernick <timo@apple.com>
3271 Reviewed by John Sullivan.
3273 Part of <rdar://problem/4466508> Add 64-bit support to the Netscape Plugin API
3275 Added to the Netscape Plugin API the concept of "plugin drawing models". The drawing model
3276 determines the kind of graphics context created by the browser for the plugin, as well as
3277 the Mac types of various Netscape Plugin API data structures.
3279 There is a drawing model to represent the old QuickDraw-based API. It is used by default
3280 if QuickDraw is available on the system, unless the plugin specifies another drawing model.
3282 The big change is the addition of the CoreGraphics drawing model. A plugin may request this
3283 drawing model to obtain access to a CGContextRef for drawing, instead of a QuickDraw CGrafPtr.
3286 Define NP_NO_QUICKDRAW when compiling 64-bit; there is no 64-bit QuickDraw.
3287 Added NPNVpluginDrawingModel, NPNVsupportsQuickDrawBool, and NPNVsupportsCoreGraphicsBool
3289 Added NPDrawingModel enumeration. Currently the only drawing models are QuickDraw and
3291 NPRegion's type now depends on the drawing model specified by the plugin.
3292 NP_Port is now only defined when QuickDraw is available.
3293 Added NP_CGContext, which is the type of the NPWindow's "window" member in CoreGraphics mode.
3295 2006-05-13 Kevin M. Ollivier <kevino@theolliviers.com>
3297 Reviewed by Darin, landed by ap.
3299 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8528
3300 Bakefiles (and generated Makefiles) for wx and gdk ports
3302 * make-generated-sources.sh:
3303 Added script to configure environment to run DerivedSources.make
3305 * JavaScriptCoreSources.bkl:
3306 Added JavaScriptCore sources list for Bakefile.
3309 Bakefile used to generate JavaScriptCore project files
3310 (currently only used by wx and gdk ports)
3312 2006-05-09 Steve Falkenburg <sfalken@apple.com>
3315 Minor fixes to WTF headers.
3319 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Fix include dirs, paths to files.
3320 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Fix include dirs.
3321 * wtf/Assertions.h: include Platform.h to get definition for COMPILER()
3322 * wtf/Vector.h: include FastMalloc.h for definition of fastMalloc, fastFree
3324 2006-05-09 Maciej Stachowiak <mjs@apple.com>
3326 Rubber stamped by Anders.
3328 - renamed kxmlcore to wtf
3334 * JavaScriptCore.xcodeproj/project.pbxproj:
3335 * bindings/c/c_instance.cpp:
3336 * bindings/objc/WebScriptObject.mm:
3337 * kjs/JSImmediate.h:
3340 * kjs/array_object.cpp:
3341 * kjs/collector.cpp:
3342 (KJS::Collector::registerThread):
3346 (KJS::isStrWhiteSpace):
3348 * kjs/identifier.cpp:
3353 (Lexer::isWhiteSpace):
3354 (Lexer::isIdentStart):
3355 (Lexer::isIdentPart):
3359 * kjs/number_object.cpp:
3361 * kjs/property_map.cpp:
3362 * kjs/property_map.h:
3363 * kjs/string_object.cpp:
3364 (StringProtoFunc::callAsFunction):
3369 * kxmlcore: Removed.
3370 * kxmlcore/AlwaysInline.h: Removed.
3371 * kxmlcore/Assertions.cpp: Removed.
3372 * kxmlcore/Assertions.h: Removed.
3373 * kxmlcore/FastMalloc.cpp: Removed.
3374 * kxmlcore/FastMalloc.h: Removed.
3375 * kxmlcore/FastMallocInternal.h: Removed.
3376 * kxmlcore/Forward.h: Removed.
3377 * kxmlcore/HashCountedSet.h: Removed.
3378 * kxmlcore/HashFunctions.h: Removed.
3379 * kxmlcore/HashMap.h: Removed.
3380 * kxmlcore/HashSet.h: Removed.
3381 * kxmlcore/HashTable.cpp: Removed.
3382 * kxmlcore/HashTable.h: Removed.
3383 * kxmlcore/HashTraits.h: Removed.
3384 * kxmlcore/ListRefPtr.h: Removed.
3385 * kxmlcore/Noncopyable.h: Removed.
3386 * kxmlcore/OwnArrayPtr.h: Removed.
3387 * kxmlcore/OwnPtr.h: Removed.
3388 * kxmlcore/PassRefPtr.h: Removed.
3389 * kxmlcore/Platform.h: Removed.
3390 * kxmlcore/RefPtr.h: Removed.
3391 * kxmlcore/TCPageMap.h: Removed.
3392 * kxmlcore/TCSpinLock.h: Removed.
3393 * kxmlcore/TCSystemAlloc.cpp: Removed.
3394 * kxmlcore/TCSystemAlloc.h: Removed.
3395 * kxmlcore/UnusedParam.h: Removed.
3396 * kxmlcore/Vector.h: Removed.
3397 * kxmlcore/VectorTraits.h: Removed.
3398 * kxmlcore/unicode: Removed.
3399 * kxmlcore/unicode/Unicode.h: Removed.
3400 * kxmlcore/unicode/UnicodeCategory.h: Removed.
3401 * kxmlcore/unicode/icu: Removed.
3402 * kxmlcore/unicode/icu/UnicodeIcu.h: Removed.
3403 * kxmlcore/unicode/posix: Removed.
3404 * kxmlcore/unicode/qt3: Removed.
3405 * kxmlcore/unicode/qt4: Removed.
3406 * kxmlcore/unicode/qt4/UnicodeQt4.h: Removed.
3409 * wtf/Assertions.cpp:
3411 * wtf/FastMalloc.cpp:
3412 (WTF::TCMalloc_ThreadCache::Scavenge):
3415 (WTF::TCMallocGuard::TCMallocGuard):
3422 * wtf/FastMallocInternal.h:
3424 * wtf/HashCountedSet.h:
3425 * wtf/HashFunctions.h:
3428 * wtf/HashTable.cpp:
3432 * wtf/Noncopyable.h:
3433 * wtf/OwnArrayPtr.h:
3437 * wtf/TCSystemAlloc.cpp:
3438 (TCMalloc_SystemAlloc):
3440 * wtf/VectorTraits.h:
3441 * wtf/unicode/UnicodeCategory.h:
3442 * wtf/unicode/icu/UnicodeIcu.h:
3444 2006-05-08 Timothy Hatcher <timothy@apple.com>
3448 * bindings/npapi.h: do not define #pragma options align=mac68k if we are 64-bit
3450 2006-05-07 Darin Adler <darin@apple.com>
3452 Reviewed and landed by Maciej.
3454 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8765
3455 Random crashes on TOT since the form state change
3457 I haven't figured out how to construct a test for this, but this does seem to fix the
3458 problem; Mitz mentioned that a double-destroy was occurring in these functions.
3460 * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use RefCounter::deref instead of calling
3461 ~ValueType, because ~ValueType often results in a double-destroy, since the HashTable also
3462 destroys the element based on the storage type. The RefCounter template correctly does work
3463 only in cases where ValueType and ValueStorageType differ and this class is what's used
3464 elsewhere for the same purpose; I somehow missed this case when optimizing HashMap.
3465 * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto.
3467 2006-05-05 Darin Adler <darin@apple.com>
3469 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8722
3470 IE compatibility fix in date parsing
3472 * kjs/date_object.cpp: (KJS::parseDate): Merged change that George Staikos provided
3473 from KDE 3.4.3 branch that allows day values of 0 and values that are > 1000.
3475 2006-05-04 Anders Carlsson <andersca@mac.com>
3479 http://bugzilla.opendarwin.org/show_bug.cgi?id=8734
3480 Would like a Vector::append that takes another Vector
3482 * kxmlcore/Vector.h:
3483 (KXMLCore::::append):
3484 New function that takes another array.
3486 2006-05-02 Steve Falkenburg <sfalken@apple.com>
3490 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: set NDEBUG for release build
3491 * kxmlcore/FastMalloc.cpp: Prevent USE_SYSTEM_MALLOC from being defined twice
3493 2006-05-02 Anders Carlsson <andersca@mac.com>
3497 * kxmlcore/HashMap.h:
3498 (KXMLCore::::operator):
3501 2006-05-01 Tim Omernick <timo@apple.com>
3503 Reviewed by Tim Hatcher.
3505 <rdar://problem/4476875> Support printing for embedded Netscape plugins
3508 Fixed struct alignment problem in our npapi.h. Structs must be 68k-aligned on both pre-Mac OS X
3509 and Mac OS X systems, as this is what plugins expect.
3511 2006-05-01 Timothy Hatcher <timothy@apple.com>
3515 <rdar://problem/4308243> 8F36 Regression: crash in malloc_consolidate if you use a .PAC file
3517 The original fix missed the oversized cell case. Added a test for "currentThreadIsMainThread ||
3518 imp->m_destructorIsThreadSafe" where we collect oversized cells.
3520 We don't have a way to test PAC files yet, so there's no test attached.
3522 * kjs/collector.cpp:
3523 (KJS::Collector::collect): test the thread when we collect oversized cells
3525 2006-05-01 Tim Omernick <timo@apple.com>
3529 <rdar://problem/4526114> REGRESSION (two days ago): LOG() just prints @ for NSObject substitutions
3531 * kxmlcore/Assertions.cpp:
3532 Changed sense of strstr("%@") check. I already made the same fix to the WebBrowser assertions.
3534 2006-04-28 Steve Falkenburg <sfalken@apple.com>
3538 Actually apply the change that was reviewed insted of checking it in with an #if 0 (oops).
3541 (main): Suppress C runtime alerts
3543 2006-04-28 Steve Falkenburg <sfalken@apple.com>