1 2006-07-23 Geoffrey Garen <ggaren@apple.com>
3 Patch by Eric Albert, reviewed by Darin and me.
5 - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code
6 crashes (Collector::markStackObjectsConservatively)
8 * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
10 (JavaJSObject::getSlot):
11 (JavaJSObject::setSlot):
13 (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
14 an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
15 and we want to scan the stack for pointers.
16 * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the
17 XCode war has started up again!
21 2006-07-21 Geoffrey Garen <ggaren@apple.com>
25 <rdar://problem/4507265> REGRESSION: overlays don't work on HousingMaps.com (Google Maps-based site)
27 - Added support for strings that masquerade as undefined. Currently used
28 by WebCore to implement undetectable style.filter.
30 The name is a little long, but it's only used in one line of code, so I
31 thought clarity should win over brevity.
34 * JavaScriptCore.xcodeproj/project.pbxproj:
36 * kjs/string_object.h:
37 (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined):
38 (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined):
39 (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean):
43 2006-07-20 Steve Falkenburg <sfalken@apple.com>
48 (KJS::escapeStringForPrettyPrinting):
50 2006-07-19 Anders Carlsson <acarlsson@apple.com>
54 <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work
56 * kjs/nodes2string.cpp:
57 (StringNode::streamTo):
58 Return the escaped string.
60 (RegExpNode::streamTo):
61 Use the correct syntax.
64 (KJS::escapeStringForPrettyPrinting):
66 Add escape function which escapes a string for pretty-printing so it can be parsed again.
68 * wtf/unicode/icu/UnicodeIcu.h:
69 (WTF::Unicode::isPrintableChar):
72 2006-07-18 Maciej Stachowiak <mjs@apple.com>
74 Reviewed by Adele Peterson.
76 <rdar://problem/4589530> REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers)
85 2006-07-18 Tim Omernick <timo@apple.com>
87 Reviewed by Tim Hatcher.
89 Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject
96 2006-07-18 Timothy Hatcher <timothy@apple.com>
98 Made the following headers public:
107 * JavaScriptCore.xcodeproj/project.pbxproj:
109 2006-07-17 Geoffrey Garen <ggaren@apple.com>
113 - Added automatic prototype creation for classes.
115 A class stores a weak reference to a prototype, which is cleared when
116 the prototype is garbage collected, to avoid a reference cycle.
118 We now have an attributes field in JSClassDefinition, that currently is
119 used only to override automatic prototype creation when you want to manage your
120 own prototypes, but can be extended in the future for other nefarious purposes.
122 Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter
123 allowing you to manage your own prototypes.
125 JSObjectMakeConstructor is more interesting now, able to make a constructor
126 on your behalf if you just give it a class.
128 - Removed bogus old code from minidom.js.
130 - Tweaked the headerdocs.
132 - Added more GC testing, which caught some leaks, and tested more funny
133 edge cases in lookup, which caught a lookup bug. Removed some testing
134 we used to do with MyObject because it was redundant with the new, cool
137 While fixing the lookup bug I retracted this change:
139 "If a static setProperty callback returns 'false', to indicate that the
140 property was not set, we no longer forward the set request up the class
141 chain, because that's almost certainly not what the programmer expected."
143 Returning false when setting a static property is a little silly, but you can see
144 it being useful when shadowing a base class's static properties, and, regardless
145 of usefullness, this is the defined behavior of the setProperty callback.
147 - Plus a little ASCII art, for the kids.
149 2006-07-17 Timothy Hatcher <timothy@apple.com>
153 <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
155 Moves WebScriptObject and WebUndefined up to WebCore.
156 This change does create an upwards-dependancy on WebScriptObject existing
157 in the loaded process, but this code path in JavaScriptCore does not get used
158 unless it is through WebKit/WebCore. Moving all of the binding code out of
159 JavaScriptCore might make sense in the future.
161 * JavaScriptCore.exp:
162 * JavaScriptCore.xcodeproj/project.pbxproj:
163 * bindings/objc/WebScriptObject.h: Replaced.
164 * bindings/objc/WebScriptObject.mm: Removed.
165 * bindings/objc/WebScriptObjectPrivate.h: Removed.
166 * bindings/objc/objc_class.h:
167 * bindings/objc/objc_instance.h:
168 * bindings/objc/objc_instance.mm:
169 (ObjcInstance::~ObjcInstance):
170 * bindings/objc/objc_runtime.h:
171 * bindings/objc/objc_runtime.mm:
172 (convertValueToObjcObject):
173 * bindings/objc/objc_utility.mm:
174 (KJS::Bindings::convertValueToObjcValue):
175 (KJS::Bindings::convertObjcValueToValue):
176 (KJS::Bindings::createObjcInstanceForValue):
178 2006-07-17 Darin Adler <darin@apple.com>
180 * API/JSBase.h: Fix comment formatting where things used to be lined up but
181 are now ragged. Got rid of spaces that attempted to line things up.
182 * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments.
184 2006-07-17 Geoffrey Garen <ggaren@apple.com>
188 - Removed the exception parameter from the initialize callback and, by extension,
189 JSObjectMake. We have never had a need for exceptions when iniitializing,
190 so the parameter seemed likely to "get in the way."
192 Also, an exception in JavaScript is thrown in response to input --
193 "invalid URL", "index not a number", etc., so it's the job of the
194 constructor function, not the initialize method, to throw.
196 If initialize *really* wants to throw, it can communicate the throw to
197 the constructor through the constructed object's private data (e.g., set
198 it to NULL, signaling to the consntructor that initialization failed.)
200 - Added JSObjectMakeWithData, which enables a constructor to set private
201 data on an object *before* it has been initialized. That way, the initialize
202 methods can properly operate on the data.
204 * API/JSNode.c: Moved ref into the initialize method, for better encapsulation,
205 now that it's possible.
206 * API/JSNodeList.c: ditto
208 (main): Do more aggressive garbage collection to test ref/deref and
210 * API/minidom.js: store childNodes in a temporary so it doesn't get re-created
211 like a thousand times. This makes debugging ref/deref easier
213 2006-07-17 Geoffrey Garen <ggaren@apple.com>
217 - Changed the initialize callback to run from least derived class (parent
218 class) to most derived class. This enables C++ style initialization,
219 and derived class overriding of member data.
221 - Added excpetion propopgation to JSObjectMake, to support initialize
222 exceptions, and generally round out our policy of making function
223 signatures as long as possible.
225 * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're
228 2006-07-17 Geoffrey Garen <ggaren@apple.com>
232 - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback,
233 to match JSObjectMakeFunctionWithCallback.
235 - Added prototype parameter, so the generated constructor
236 automatically works with hasInstance / instanceof
238 - Moved hasInstance implementation from InternalFunctionImp to JSObject
239 so that subclasses can inherit it without inheriting function-related baggage.
240 More refactoring here would be good, but this seems like a good short-term
243 (KJS::JSCallbackFunction::implementsHasInstance): override and return false,
244 because callback functions aren't constructors.
246 2006-07-17 Maciej Stachowiak <mjs@apple.com>
250 - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations;
251 except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.
253 Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
254 but usually uninteresting parameter.
258 (JSCheckScriptSyntax):
261 * API/JSCallbackObject.cpp:
262 (KJS::JSCallbackObject::JSCallbackObject):
263 (KJS::JSCallbackObject::init):
264 (KJS::JSCallbackObject::getOwnPropertySlot):
265 (KJS::JSCallbackObject::put):
266 (KJS::JSCallbackObject::deleteProperty):
267 (KJS::JSCallbackObject::toNumber):
268 (KJS::JSCallbackObject::toString):
269 * API/JSContextRef.cpp:
270 (JSGlobalContextCreate):
271 (JSGlobalContextRetain):
272 (JSGlobalContextRelease):
273 (JSContextGetGlobalObject):
274 * API/JSContextRef.h:
276 (JSNodePrototype_appendChild):
277 (JSNodePrototype_removeChild):
278 (JSNodePrototype_replaceChild):
279 (JSNode_getNodeType):
280 (JSNode_getFirstChild):
283 (JSNodeListPrototype_item):
285 (JSNodeList_getProperty):
286 (JSNodeList_prototype):
287 * API/JSObjectRef.cpp:
289 (JSObjectMakeFunctionWithCallback):
290 (JSObjectMakeConstructor):
291 (JSObjectMakeFunction):
292 (JSObjectGetPrototype):
293 (JSObjectSetPrototype):
294 (JSObjectHasProperty):
295 (JSObjectGetProperty):
296 (JSObjectSetProperty):
297 (JSObjectGetPropertyAtIndex):
298 (JSObjectSetPropertyAtIndex):
299 (JSObjectDeleteProperty):
300 (JSObjectIsFunction):
301 (JSObjectCallAsFunction):
302 (JSObjectIsConstructor):
303 (JSObjectCallAsConstructor):
304 (JSObjectCopyPropertyNames):
306 * API/JSStringRef.cpp:
307 * API/JSValueRef.cpp:
309 (JSValueIsUndefined):
315 (JSValueIsObjectOfClass):
317 (JSValueIsStrictEqual):
318 (JSValueIsInstanceOfConstructor):
319 (JSValueMakeUndefined):
321 (JSValueMakeBoolean):
326 (JSValueToStringCopy):
334 (MyObject_getProperty):
335 (MyObject_deleteProperty):
336 (MyObject_callAsFunction):
337 (MyObject_callAsConstructor):
338 (MyObject_convertToType):
339 (print_callAsFunction):
342 2006-07-16 Geoffrey Garen <ggaren@apple.com>
344 Approved by Maciej, RS by Beth.
346 JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback
347 JSObjectMakeFunctionWithBody -> JSObjectMakeFunction
349 because the latter is more common, and more fundamental, than the former.
354 * API/JSCallbackObject.cpp:
355 (KJS::JSCallbackObject::getOwnPropertySlot):
356 (KJS::JSCallbackObject::put):
357 (KJS::JSCallbackObject::deleteProperty):
358 (KJS::JSCallbackObject::getPropertyNames):
359 (KJS::JSCallbackObject::staticValueGetter):
360 (KJS::JSCallbackObject::staticFunctionGetter):
361 * API/JSClassRef.cpp:
362 (OpaqueJSClass::OpaqueJSClass):
363 (OpaqueJSClass::~OpaqueJSClass):
365 * API/JSObjectRef.cpp:
367 (JSObjectMakeFunctionWithCallback):
368 (JSObjectMakeFunction):
369 (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
370 (JSObjectCopyPropertyNames):
377 * JavaScriptCore.exp:
379 2006-07-16 Geoffrey Garen <ggaren@apple.com>
383 Replace __JS with OpaqueJS because the former, while used by CF, is
384 a prefix that's triply-reserved by the compiler. (_* is reserved in global
385 names, _[A-Z] is reserved in all names, and __ is reserved in all names
388 Opaque is an alternative used by other Mac OS X framewokrs.
393 * API/JSCallbackObject.cpp:
394 (KJS::JSCallbackObject::getOwnPropertySlot):
395 (KJS::JSCallbackObject::put):
396 (KJS::JSCallbackObject::deleteProperty):
397 (KJS::JSCallbackObject::getPropertyNames):
398 (KJS::JSCallbackObject::staticValueGetter):
399 (KJS::JSCallbackObject::staticFunctionGetter):
400 * API/JSClassRef.cpp:
401 (OpaqueJSClass::OpaqueJSClass):
402 (OpaqueJSClass::~OpaqueJSClass):
404 * API/JSObjectRef.cpp:
406 (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
407 (JSObjectCopyPropertyNames):
409 2006-07-16 Darin Adler <darin@apple.com>
411 - try to fix Windows build
413 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
414 Added some recently added files, removed some recently removed.
416 2006-07-16 Geoffrey Garen <ggaren@apple.com>
420 - Change getProperty* to return undefined, rather than NULL, for missing
421 properties, since that's what the spec says. Also added exception out
422 parameters to the *Index functions, because they can call through to the
423 regular functions, which can throw for custom objects.
425 * API/JSObjectRef.cpp:
426 (JSObjectGetProperty):
427 (JSObjectGetPropertyAtIndex):
428 (JSObjectSetPropertyAtIndex):
433 2006-07-16 Geoffrey Garen <ggaren@apple.com>
437 - Properly document and handle NULL callbacks for static properties. We
438 throw an exception in any case other than a ReadOnly property with a NULL
439 setProperty callback, because a NULL callback almost certainly indicates
440 a programming error. Also throw an exception if hasProperty returns true
441 for a property that getProperty can't get.
443 - If a static setProperty callback returns 'false', to indicate that the
444 property was not set, we no longer forward the set request up the class
445 chain, because that's almost certainly not what the programmer expected.
447 * API/JSCallbackObject.cpp:
448 (KJS::JSCallbackObject::getOwnPropertySlot):
449 (KJS::JSCallbackObject::put):
450 (KJS::JSCallbackObject::staticValueGetter):
451 (KJS::JSCallbackObject::staticFunctionGetter):
452 (KJS::JSCallbackObject::callbackGetter):
456 (MyObject_hasProperty):
459 2006-07-16 Geoffrey Garen <ggaren@apple.com>
463 - Added names to functions.
465 - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors.
466 The private data idiom is that a JS object stores its native implementation
467 as private data. For functions and constructors, the native implementation is nothing
468 more than the callback they already store, so supporting private data, too,
469 confuses the idiom. If you *really* want, you can still create a custom
470 function with private data.
472 * API/JSCallbackConstructor.cpp:
473 * API/JSCallbackConstructor.h:
474 * API/JSCallbackFunction.cpp:
475 (KJS::JSCallbackFunction::JSCallbackFunction):
476 * API/JSCallbackFunction.h:
477 * API/JSCallbackObject.cpp:
478 (KJS::JSCallbackObject::staticFunctionGetter):
479 * API/JSObjectRef.cpp:
480 (JSObjectMakeFunction):
481 (JSObjectMakeFunctionWithBody):
482 (JSObjectGetPrivate):
483 (JSObjectSetPrivate):
490 2006-07-15 Maciej Stachowiak <mjs@apple.com>
494 - switch property lists to be vector+set of Identifiers instead of list of References
496 This has the following benefits:
498 - no duplicates in property lists
499 - simplifies API calls
500 - probably more efficient, since linked list is gone
501 - entirely removed Reference, ReferenceList and ProtectedReference types from the API
503 * kjs/PropertyNameArray.cpp: Added.
504 (KJS::PropertyNameArray::add): Check set, if not already there, add to
506 * kjs/PropertyNameArray.h: Added.
507 (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines
508 a set and a vector to make a unique but ordered list of identifiers.
509 (KJS::PropertyNameArray::begin): ditto
510 (KJS::PropertyNameArray::end): ditto
511 (KJS::PropertyNameArray::size): ditto
512 (KJS::PropertyNameArray::operator[]): ditto
513 * kjs/array_instance.h:
514 * kjs/array_object.cpp:
515 (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated
516 for PropertyNameArray
517 (ArrayInstance::setLength): updated for PropertyNameArray
518 (ArrayInstance::pushUndefinedObjectsToEnd): ditto
520 (ForInNode::execute): updated for PropertyNameArray
523 (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated
524 for PropertyNameArray
526 * kjs/property_map.cpp:
527 (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray
528 (KJS::PropertyMap::getSparseArrayPropertyNames): ditto
529 * kjs/property_map.h:
530 * kjs/protected_reference.h: Removed.
531 * kjs/reference.cpp: Removed.
532 * kjs/reference.h: Removed.
533 * kjs/reference_list.cpp: Removed.
534 * kjs/reference_list.h: Removed.
535 * kjs/scope_chain.cpp:
536 (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList.
537 * kjs/string_object.cpp:
538 (StringInstance::getPropertyNames): Updated for new approach.
539 * kjs/string_object.h:
542 (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray*
545 * API/JSCallbackObject.cpp:
546 (KJS::JSCallbackObject::getPropertyNames): Fixed for new API.
547 * API/JSCallbackObject.h:
548 * API/JSObjectRef.cpp:
549 (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended
550 JSPropertyNameArrayRef.
551 (JSObjectCopyPropertyNames): New API call - renamed / refactored from
552 JSObjectCreatePropertyList
553 (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray.
554 (JSPropertyNameArrayRelease): new release call for - " -.
555 (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you
556 can now get the count and items in any order.
557 (JSPropertyNameArrayGetNameAtIndex): See above.
558 (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque
560 * API/JSObjectRef.h: Prototyped new functions, removed old ones
561 * JavaScriptCore.exp: Updated exported symbols.
562 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old.
564 (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm.
565 (main): Updated for new API.
567 2006-07-15 Darin Adler <darin@apple.com>
569 - oops, missed a few more arrays that had to be const
572 (JSNodePrototype_appendChild): Added const.
573 (JSNodePrototype_removeChild): Ditto.
574 (JSNodePrototype_replaceChild): Ditto.
575 (JSNode_construct): Ditto.
577 (JSNodeListPrototype_item): Ditto.
578 * API/JSObjectRef.cpp:
579 (JSObjectMakeFunctionWithBody): Ditto.
580 (JSObjectCallAsFunction): Ditto.
581 (JSObjectCallAsConstructor): Ditto.
585 (MyObject_callAsFunction): Ditto.
586 (MyObject_callAsConstructor): Ditto.
587 (print_callAsFunction): Ditto.
588 (myConstructor_callAsConstructor): Ditto.
590 2006-07-15 Darin Adler <darin@apple.com>
594 * API/JSNode.h: Made an array parameter const.
595 * API/JSObjectRef.h: Made array parameters const. Fixed a comment.
597 2006-07-15 Geoffrey Garen <ggaren@apple.com>
601 - JSObjectMakeFunctionWithBody includes a function name and named parameters now.
603 * API/JSObjectRef.cpp:
604 (JSObjectMakeFunctionWithBody):
607 (assertEqualsAsUTF8String): More informative failure reporting.
608 (main): Test more function cases.
610 2006-07-15 Geoffrey Garen <ggaren@apple.com>
614 - Moved the arguments passed to JSClassCreate into a single structure,
615 called JSClassDefinition. This will enable easier structure
616 migration/versioning in the future, if necessary.
618 - Added support for class names.
620 - kJSClassDefinitionNull replaces kJSObjectCallbacksNone.
622 - JSClass is becoming a fairly complex struct, so I migrated all of its
623 implementation other than reference counting to the sruct.
625 - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're
626 declared in JSObjectRef.h
628 - Also added some more informative explanation to the class structure doc.
630 2006-07-15 Darin Adler <darin@apple.com>
634 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8395
635 <rdar://problem/4613467>
636 REGRESSION: RegEx seems broken for hex escaped non breaking space
638 Test: fast/js/regexp-extended-characters-more.html
641 (match): Got rid of utf16Length local variable to guarantee there's no
642 extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16
643 code that were using the length variable, which is the UTF-8 length of
644 a character in the pattern, to move in the UTF-16 subject string. Instead
645 they hardcode lengths of 1 and 2 since the code already handles BMP
646 characters and surrogate pairs separately. Also fixed some DPRINTF so
647 I could compile with DEBUG on.
648 (pcre_exec): Changed a place that was checking for multibyte characters
649 in the subject string to use ISMIDCHAR. Instead it was using hardcoded
650 logic that was right for UTF-8 but wrong for UTF-16.
652 * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile
655 2006-07-14 Geoffrey Garen <ggaren@apple.com>
659 Global replace in the API of argc/argv with argumentCount/arguments.
661 2006-07-14 Geoffrey Garen <ggaren@apple.com>
665 - Finalized exception handling in the API.
667 setProperty can throw because it throws for built-in arrays. getProperty
668 and deleteProperty can throw because setProperty can throw and we want
669 to be consistent, and also because they seem like "actions." callAsFunction,
670 callAsConstructor, and hasInstance can throw, because they caan throw for
673 toBoolean can't throw because it's defined that way in the spec.
675 - Documented that toBoolean and toObject can't be overridden by custom
676 objects because they're defined that way in the spec.
678 === Safari-521.17 ===
680 2006-07-14 Geoffrey Garen <ggaren@apple.com>
684 - Implemented ref-counting of JSContexts by splitting into two datatypes:
685 JSGlobalContext, which you can create/retain/release, and JSContext, which
688 Internally, you retain a JSGlobalContext/ExecState by retaining its
689 interpreter, which, in the case of a global ExecState, owns it.
691 - Also made ~Interpreter() protected to catch places where Interpreter
692 is manually deleted. (Can't make it private because some crazy fool
693 decided it would be a good idea to subclass Interpreter in other frameworks.
697 (toJS): Added cast for new JSGlobalContext
698 * API/JSStringRef.h: Changed vague "you must" language to more specific
699 (but, ultimately, equally vague) "behavior is undefined if you don't"
701 (KJS::Interpreter::Interpreter): Factored more common initialization into
704 (KJS::Interpreter::ref): new
705 (KJS::Interpreter::deref): new
706 (KJS::Interpreter::refCount): new
708 (doIt): Ref-count the interpreter.
710 2006-07-14 Maciej Stachowiak <mjs@apple.com>
714 - removed bool return value from JSObjectSetProperty, since it is inefficient and
715 also doesn't work quite right
716 - added JSObjectGetPropertyAtIndex and JSObjectSetPropertyAtIndex
718 * API/JSObjectRef.cpp:
719 (JSObjectSetProperty): Removed return value and canPut stuff.
720 (JSObjectGetPropertyAtIndex): Added.
721 (JSObjectSetPropertyAtIndex): Added.
722 * API/JSObjectRef.h: Prototyped and documented new functions.
724 2006-07-14 Geoffrey Garen <ggaren@apple.com>
728 Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into
729 JSBase.h/.cpp. They don't belong in the value-specific or context-specific
730 files because they're not part of the value or context implementations.
733 * API/JSContextRef.cpp:
734 (JSContextGetGlobalObject):
735 * API/JSContextRef.h:
736 * API/JSValueRef.cpp:
739 * JavaScriptCore.xcodeproj/project.pbxproj:
741 2006-07-13 Timothy Hatcher <timothy@apple.com>
745 Moved JavaScriptCore to be a public framework.
747 * JavaScriptCore.xcodeproj/project.pbxproj:
749 2006-07-13 Mark Rowe <opendarwin.org@bdash.net.nz>
751 Reviewed by Geoffrey.
753 http://bugzilla.opendarwin.org/show_bug.cgi?id=9742
754 Bug 9742: REGRESSION: WebKit hangs when loading <http://www.vtbook.com>
757 (KJS::JSValue::getUInt32): Only types tagged as numeric can be converted to UInt32.
759 2006-07-13 Geoffrey Garen <ggaren@apple.com>
763 - Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax
764 - Added exception out parameters to JSValueTo* and JSValueIsEqual because
766 - Removed JSObjectGetDescription because it's useless and vague, and
767 JSValueToString/JSValueIsObjectOfClass do a better job, anyway
768 - Clarified comments about "IsFunction/Constructor" to indicate that they
769 are true of all functions/constructors, not just those created by JSObjectMake*
771 2006-07-12 Geoffrey Garen <ggaren@apple.com>
775 Finished previously approved JSInternalString -> JSString conversion
776 by renaming the files.
778 * API/JSCallbackObject.cpp:
779 * API/JSInternalStringRef.cpp: Removed.
780 * API/JSInternalStringRef.h: Removed.
781 * API/JSStringRef.cpp: Added.
782 * API/JSStringRef.h: Added.
783 * API/JavaScriptCore.h:
784 * JavaScriptCore.xcodeproj/project.pbxproj:
786 2006-07-12 Geoffrey Garen <ggaren@apple.com>
790 - Removed context and exception parameters from JSObjectGetPropertyEnumerator,
791 removing the spurious use of ExecState inside JavaScriptCore that made
792 us think this was necessary in the first place.
794 (StringInstance::getPropertyList): Use getString instead of toString because
795 we know we're dealing with a string -- we put it there in the first place.
796 While we're at it, store the string's size instead of retrieving it each time
797 through the loop, to avoid the unnecessary killing of puppies.
798 * kjs/string_object.h:
800 2006-07-12 Maciej Stachowiak <mjs@apple.com>
804 - add handling of hasInstance callback for API objects
806 * API/JSCallbackObject.cpp:
807 (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present.
808 (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback.
809 * API/JSCallbackObject.h:
810 * API/JSClassRef.cpp:
813 (MyObject_hasInstance): Test case; should match what construct would do.
816 2006-07-11 Geoffrey Garen <ggaren@apple.com>
820 - Implemented a vast number of renames and comment clarifications
821 suggested during API review.
823 JSInternalString -> JSString
824 JS*Make -> JSValueMake*, JSObjectMake*
826 JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code)
827 JSGC*Protect -> JSValue*Protect
828 JS*Callback -> JSObject*Callback
829 JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback
830 JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName
832 JSStringCreateWithUTF8CString, JSStringGetUTF8CString,
833 JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString,
834 JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters.
836 - Changed functions taking a JSValue out arg and returning a bool indicating
837 whether it was set to simply return a JSValue or NULL.
839 - Removed JSStringGetCharacters because it's more documentation than code,
840 and it's just a glorified memcpy built on existing API functionality.
842 - Moved standard library includes into the headers that actually require them.
844 - Standardized use of the phrase "Create Rule."
846 - Removed JSLock from make functions that don't allocate.
848 - Added exception handling to JSValueToBoolean, since we now allow
849 callback objects to throw exceptions upon converting to boolean.
851 - Renamed JSGCCollect to JSGarbageCollect.
853 2006-07-10 Geoffrey Garen <ggaren@apple.com>
857 - Changed public header includes to the <JavaScriptCore/ style.
858 - Changed instances of 'buffer' to 'string' since we decided on
859 JSInternalString instead of JSStringBuffer.
861 * API/JSContextRef.h:
862 * API/JSInternalStringRef.cpp:
864 (JSInternalStringRetain):
865 (JSInternalStringRelease):
866 (JSValueCopyStringValue):
867 (JSInternalStringGetLength):
868 (JSInternalStringGetCharactersPtr):
869 (JSInternalStringGetCharacters):
870 (JSInternalStringGetMaxLengthUTF8):
871 (JSInternalStringGetCharactersUTF8):
872 (CFStringCreateWithJSInternalString):
873 * API/JSInternalStringRef.h:
875 (JSNodePrototype_appendChild):
876 (JSNode_getNodeType):
877 * API/JSObjectRef.cpp:
878 (JSObjectCallAsConstructor):
880 * API/JavaScriptCore.h:
885 (MyObject_getPropertyList):
886 (myConstructor_callAsConstructor):
887 (main): I noticed that we were prematurely releasing some string buffers,
888 so I moved their release calls to the end of main(). I got rid of 'Buf' in *Buf
889 (sometimes changing to 'IString', when necessary to differentiate a variable)
890 to match the buffer->string change.
892 === Safari-521.16 ===
894 2006-07-10 Darin Adler <darin@apple.com>
896 * kjs/value.cpp: (KJS::JSValue::toInt32Inline): Added inline keyword one more place.
899 2006-07-10 Darin Adler <darin@apple.com>
901 - fix the release build
905 (KJS::JSValue::toInt32Inline): Move the code here to an inline.
906 (KJS::JSValue::toInt32): Call the inline from both overloaded toInt32 functions.
908 2006-07-10 David Kilzer <ddkilzer@kilzer.net>
912 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
913 Implement select.options.add() method
915 * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method.
916 * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for
917 kjs/value.h to make it available as a forwarded header.
919 (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method.
920 The new method returns a boolean value if no entry is found in the lookup table.
922 (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument.
923 * kjs/value.h: Ditto.
925 2006-07-10 Geoffrey Garen <ggaren@apple.com>
927 No review necessary. Removed bogus file I accidentally checked in before.
929 * API/JSInternalSringRef.h: Removed.
931 2006-07-10 Geoffrey Garen <ggaren@apple.com>
935 Added exception out parameter to API object callbacks, removed semi-bogus
936 JSContext(.*)Exception functions.
938 To make these calls syntactically simple, I added an exceptionSlot()
939 method to the ExecState class, which provides a JSValue** slot in which to
940 store a JSValue* exception.
944 * API/JSCallbackConstructor.cpp:
945 (KJS::JSCallbackConstructor::construct):
946 * API/JSCallbackFunction.cpp:
947 (KJS::JSCallbackFunction::callAsFunction):
948 * API/JSCallbackObject.cpp:
949 (KJS::JSCallbackObject::init):
950 (KJS::JSCallbackObject::getOwnPropertySlot):
951 (KJS::JSCallbackObject::put):
952 (KJS::JSCallbackObject::deleteProperty):
953 (KJS::JSCallbackObject::construct):
954 (KJS::JSCallbackObject::callAsFunction):
955 (KJS::JSCallbackObject::getPropertyList):
956 (KJS::JSCallbackObject::toBoolean):
957 (KJS::JSCallbackObject::toNumber):
958 (KJS::JSCallbackObject::toString):
959 (KJS::JSCallbackObject::staticValueGetter):
960 (KJS::JSCallbackObject::callbackGetter):
961 * API/JSContextRef.cpp:
963 * API/JSContextRef.h:
965 (JSNodePrototype_appendChild):
966 (JSNodePrototype_removeChild):
967 (JSNodePrototype_replaceChild):
968 (JSNode_getNodeType):
969 (JSNode_getChildNodes):
970 (JSNode_getFirstChild):
974 (JSNodeListPrototype_item):
976 (JSNodeList_getProperty):
981 (MyObject_initialize):
982 (MyObject_hasProperty):
983 (MyObject_getProperty):
984 (MyObject_setProperty):
985 (MyObject_deleteProperty):
986 (MyObject_getPropertyList):
987 (MyObject_callAsFunction):
988 (MyObject_callAsConstructor):
989 (MyObject_convertToType):
990 (print_callAsFunction):
991 (myConstructor_callAsConstructor):
993 * JavaScriptCore.exp:
995 (KJS::ExecState::exceptionHandle):
997 2006-07-10 Geoffrey Garen <ggaren@apple.com>
1001 Improved type safety by implementing opaque JSValue/JSObject typing through
1002 abuse of 'const', not void*. Also fixed an alarming number of bugs
1003 exposed by this new type safety.
1005 I made one design change in JavaScriptCore, which is that the JSObject
1006 constructor should take a JSValue* as its prototype argument, not a JSObject*,
1007 since we allow the prototype to be any JSValue*, including jsNull(), for
1013 * API/JSCallbackConstructor.cpp:
1014 (KJS::JSCallbackConstructor::construct):
1015 * API/JSCallbackFunction.cpp:
1016 (KJS::JSCallbackFunction::callAsFunction):
1017 * API/JSCallbackObject.cpp:
1018 (KJS::JSCallbackObject::JSCallbackObject):
1019 (KJS::JSCallbackObject::getOwnPropertySlot):
1020 (KJS::JSCallbackObject::put):
1021 (KJS::JSCallbackObject::construct):
1022 (KJS::JSCallbackObject::callAsFunction):
1023 (KJS::JSCallbackObject::staticFunctionGetter):
1024 * API/JSCallbackObject.h:
1025 * API/JSContextRef.cpp:
1028 (JSNodePrototype_appendChild):
1029 (JSNodePrototype_removeChild):
1030 (JSNodePrototype_replaceChild):
1031 * API/JSObjectRef.cpp:
1033 (JSFunctionMakeWithBody):
1034 (JSObjectGetProperty):
1035 (JSObjectCallAsFunction):
1036 (JSObjectCallAsConstructor):
1037 * API/JSObjectRef.h:
1042 (KJS::JSObject::JSObject):
1044 2006-07-10 Geoffrey Garen <ggaren@apple.com>
1046 Approved by Maciej, Darin.
1048 Renamed JSStringBufferRef to JSInternalStringRef. "Internal string" means the
1049 JavaScript engine's internal string representation, which is the most
1050 low-level and efficient representation to use when interfacing with JavaScript.
1056 * API/JSCallbackObject.cpp:
1057 (KJS::JSCallbackObject::getOwnPropertySlot):
1058 (KJS::JSCallbackObject::put):
1059 (KJS::JSCallbackObject::deleteProperty):
1060 (KJS::JSCallbackObject::staticValueGetter):
1061 (KJS::JSCallbackObject::callbackGetter):
1062 * API/JSContextRef.cpp:
1065 * API/JSContextRef.h:
1066 * API/JSInternalStringRef.cpp: Added.
1068 (JSInternalStringCreate):
1069 (JSInternalStringCreateUTF8):
1070 (JSInternalStringRetain):
1071 (JSInternalStringRelease):
1072 (JSValueCopyStringValue):
1073 (JSInternalStringGetLength):
1074 (JSInternalStringGetCharactersPtr):
1075 (JSInternalStringGetCharacters):
1076 (JSInternalStringGetMaxLengthUTF8):
1077 (JSInternalStringGetCharactersUTF8):
1078 (JSInternalStringIsEqual):
1079 (JSInternalStringIsEqualUTF8):
1080 (JSInternalStringCreateCF):
1081 (CFStringCreateWithJSInternalString):
1082 * API/JSInternalStringRef.h: Added.
1084 (JSNodePrototype_appendChild):
1085 (JSNode_getNodeType):
1086 (JSNode_getChildNodes):
1087 (JSNode_getFirstChild):
1089 (JSNodeList_length):
1090 (JSNodeList_getProperty):
1091 * API/JSObjectRef.cpp:
1092 (JSFunctionMakeWithBody):
1093 (JSObjectGetDescription):
1094 (JSObjectHasProperty):
1095 (JSObjectGetProperty):
1096 (JSObjectSetProperty):
1097 (JSObjectDeleteProperty):
1098 (JSPropertyEnumeratorGetNext):
1099 (JSPropertyListAdd):
1100 * API/JSObjectRef.h:
1101 * API/JSStringBufferRef.cpp: Removed.
1102 * API/JSStringBufferRef.h: Removed.
1104 * API/JavaScriptCore.h:
1109 (assertEqualsAsUTF8String):
1110 (assertEqualsAsCharactersPtr):
1111 (assertEqualsAsCharacters):
1112 (MyObject_hasProperty):
1113 (MyObject_getProperty):
1114 (MyObject_setProperty):
1115 (MyObject_deleteProperty):
1116 (MyObject_getPropertyList):
1117 (print_callAsFunction):
1118 (myConstructor_callAsConstructor):
1120 * JavaScriptCore.exp:
1121 * JavaScriptCore.xcodeproj/project.pbxproj:
1123 2006-07-08 Tim Omernick <timo@apple.com>
1127 Added an OpenGL drawing model to the Netscape Plug-in API.
1131 2006-07-08 Timothy Hatcher <timothy@apple.com>
1135 Moved KJS_GetCreatedJavaVMs to jni_utility.cpp.
1136 Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym
1137 now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol
1138 are deprecated in Leopard.
1140 * JavaScriptCore.exp:
1141 * JavaScriptCore.xcodeproj/project.pbxproj:
1142 * bindings/jni/jni_utility.cpp:
1143 (KJS::Bindings::KJS_GetCreatedJavaVMs):
1144 * bindings/softlinking.c: Removed.
1145 * bindings/softlinking.h: Removed.
1147 2006-07-08 Geoffrey Garen <ggaren@apple.com>
1151 - Make JSObjectGetProperty return a JSValue or NULL, like JSEvaluate does.
1153 * API/JSObjectRef.cpp:
1154 (JSObjectGetProperty):
1155 * API/JSObjectRef.h:
1159 2006-07-08 Geoffrey Garen <ggaren@apple.com>
1161 Style change -- no review necessary.
1163 Use 0 instead of NULL in API .cpp files, to match our style guidelines.
1165 * API/JSContextRef.cpp:
1167 * API/JSObjectRef.cpp:
1168 (JSFunctionMakeWithBody):
1169 (JSObjectCallAsFunction):
1170 (JSObjectCallAsConstructor):
1171 * API/JSValueRef.cpp:
1174 2006-07-08 Geoffrey Garen <ggaren@apple.com>
1178 - Added ability to pass NULL for thisObject when calling JSObjectCallAsFunction,
1179 to match JSEvaluate.
1181 * API/JSObjectRef.cpp:
1182 (JSObjectCallAsFunction):
1183 * API/JSObjectRef.h:
1187 === Safari-521.15 ===
1189 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1193 - Standardized which functions take a JSContext as an argument. The rule is:
1194 if you might execute JavaScript, you take a JSContext, otherwise you don't.
1196 The FIXME in JSObjectRef.h requires refactoring some parts of Interpreter,
1197 but not API changes, so I'm putting it off until later.
1199 * API/JSCallbackObject.cpp:
1200 (KJS::JSCallbackObject::JSCallbackObject):
1201 (KJS::JSCallbackObject::init):
1202 * API/JSCallbackObject.h:
1203 * API/JSContextRef.cpp:
1205 * API/JSContextRef.h:
1206 * API/JSObjectRef.cpp:
1208 (JSPropertyEnumeratorGetNext):
1209 * API/JSObjectRef.h:
1211 (MyObject_initialize):
1213 * JavaScriptCore.exp:
1214 * kjs/array_object.cpp:
1215 (ArrayInstance::setLength):
1216 (ArrayInstance::pushUndefinedObjectsToEnd):
1218 (ForInNode::execute):
1219 * kjs/reference.cpp:
1220 (KJS::Reference::getPropertyName):
1221 (KJS::Reference::getValue):
1223 * kjs/scope_chain.cpp:
1224 (KJS::ScopeChain::print):
1226 2006-07-06 Geoffrey Garen <ggaren@apple.com>
1232 - Headerdoc finished
1235 - Added a JSContextRef argument to many functions, because you need a
1236 JSContextRef for doing virtually anything. I expect to add this argument
1237 to even more functions in a future patch.
1239 - Removed the globalObjectPrototype argument to JSContextCreate because
1240 you can't create an object until you have a context, so it's impossible
1241 to pass a prototype object to JSContextCreate. That's OK because (1) there's
1242 no reason to give the global object a prototype and (2) if you really want
1243 to, you can just use a separate call to JSObjectSetPrototype.
1245 - Removed the JSClassRef argument to JSClassCreate because it was unnecessary,
1246 and you need to be able to make the global object's class before you've
1247 created a JSContext.
1249 - Added an optional exception parameter to JSFunctionMakeWithBody because anything
1250 less would be uncivilized.
1252 - Made the return value parameter to JSObjectGetProperty optional to match
1253 all other return value parameters in the API.
1255 - Made JSObjectSetPrivate/JSObjectGetPrivate work on JSCallbackFunctions
1256 and JSCallbackConstructors. You could use an abstract base class or strategic
1257 placement of m_privateData in the class structure to implement this, but
1258 the former seemed like overkill, and the latter seemed too dangerous.
1260 - Fixed a bug where JSPropertyEnumeratorGetNext would skip the first property.
1263 - Reversed the logic of the JSChar #ifdef to avoid confusing headerdoc
1265 - Removed function names from @function declarations because headeroc
1266 can parse them automatically, and I wanted to rule out manual mismatch.
1268 - Changed Error::create to take a const UString& instead of a UString*
1269 because it was looking at me funny.
1271 - Renamed JSStringBufferCreateWithCFString to JSStringBufferCreateCF
1272 because the latter is more concise and it matches JSStringBufferCreateUTF8.
1274 * API/JSCallbackObject.cpp:
1275 (KJS::JSCallbackObject::getOwnPropertySlot):
1276 (KJS::JSCallbackObject::put):
1277 (KJS::JSCallbackObject::deleteProperty):
1278 (KJS::JSCallbackObject::getPropertyList):
1279 (KJS::JSCallbackObject::toBoolean):
1280 (KJS::JSCallbackObject::toNumber):
1281 (KJS::JSCallbackObject::toString):
1282 * API/JSClassRef.cpp:
1284 * API/JSContextRef.cpp:
1286 (JSContextSetException):
1287 * API/JSContextRef.h:
1289 (JSNodePrototype_class):
1292 (JSNodeListPrototype_class):
1294 * API/JSObjectRef.cpp:
1295 (JSObjectGetProperty):
1296 (JSObjectGetPrivate):
1297 (JSObjectSetPrivate):
1298 (JSObjectCallAsFunction):
1299 (JSObjectCallAsConstructor):
1300 (JSPropertyEnumeratorGetNext):
1301 * API/JSObjectRef.h:
1302 * API/JSStringBufferRef.cpp:
1303 (JSStringBufferCreateCF):
1304 * API/JSStringBufferRef.h:
1305 * API/JSValueRef.cpp:
1306 (JSValueIsInstanceOf):
1312 (MyObject_hasProperty):
1313 (MyObject_setProperty):
1314 (MyObject_deleteProperty):
1315 (MyObject_getPropertyList):
1316 (MyObject_convertToType):
1319 * JavaScriptCore.exp:
1321 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1325 - Fixed a few crashes resulting from NULL parameters to JSClassCreate.
1327 * API/JSClassRef.cpp:
1330 * API/testapi.c: Added test for NULL parameters.
1333 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1335 Reviewed by John, mocked by Darin.
1337 - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as
1338 "this," since "this" must be an object.
1340 * API/JSContextRef.cpp:
1342 * API/JSContextRef.h:
1344 2006-07-07 Geoffrey Garen <ggaren@apple.com>
1351 * JavaScriptCore.xcodeproj/project.pbxproj:
1353 2006-07-05 Geoffrey Garen <ggaren@apple.com>
1357 Renamed JSCharBufferRef, which was universally unpopular, to JSStringBufferRef,
1358 which, hopefully, will be less unpopular.
1364 * API/JSCallbackObject.cpp:
1365 (KJS::JSCallbackObject::getOwnPropertySlot):
1366 (KJS::JSCallbackObject::put):
1367 (KJS::JSCallbackObject::deleteProperty):
1368 (KJS::JSCallbackObject::staticValueGetter):
1369 (KJS::JSCallbackObject::callbackGetter):
1370 * API/JSCharBufferRef.cpp: Removed.
1371 * API/JSCharBufferRef.h: Removed.
1372 * API/JSContextRef.cpp:
1375 * API/JSContextRef.h:
1377 (JSNodePrototype_appendChild):
1378 (JSNode_getNodeType):
1379 (JSNode_getChildNodes):
1380 (JSNode_getFirstChild):
1382 (JSNodeList_length):
1383 (JSNodeList_getProperty):
1384 * API/JSObjectRef.cpp:
1385 (JSFunctionMakeWithBody):
1386 (JSObjectGetDescription):
1387 (JSObjectHasProperty):
1388 (JSObjectGetProperty):
1389 (JSObjectSetProperty):
1390 (JSObjectDeleteProperty):
1391 (JSPropertyEnumeratorGetNext):
1392 (JSPropertyListAdd):
1393 * API/JSObjectRef.h:
1394 * API/JSStringBufferRef.cpp: Added.
1396 (JSStringBufferCreate):
1397 (JSStringBufferCreateUTF8):
1398 (JSStringBufferRetain):
1399 (JSStringBufferRelease):
1400 (JSValueCopyStringValue):
1401 (JSStringBufferGetLength):
1402 (JSStringBufferGetCharactersPtr):
1403 (JSStringBufferGetCharacters):
1404 (JSStringBufferGetMaxLengthUTF8):
1405 (JSStringBufferGetCharactersUTF8):
1406 (JSStringBufferIsEqual):
1407 (JSStringBufferIsEqualUTF8):
1408 (JSStringBufferCreateWithCFString):
1409 (CFStringCreateWithJSStringBuffer):
1410 * API/JSStringBufferRef.h: Added.
1412 * API/JavaScriptCore.h:
1417 (assertEqualsAsUTF8String):
1418 (assertEqualsAsCharactersPtr):
1419 (assertEqualsAsCharacters):
1420 (MyObject_hasProperty):
1421 (MyObject_getProperty):
1422 (MyObject_setProperty):
1423 (MyObject_deleteProperty):
1424 (MyObject_getPropertyList):
1425 (print_callAsFunction):
1426 (myConstructor_callAsConstructor):
1428 * JavaScriptCore.exp:
1429 * JavaScriptCore.xcodeproj/project.pbxproj:
1431 2006-07-05 Geoffrey Garen <ggaren@apple.com>
1435 Moved some code around for more logical file separation.
1438 * API/JSContextRef.h:
1439 * API/JSObjectRef.cpp:
1440 * API/JSValueRef.cpp:
1444 2006-07-03 Geoffrey Garen <ggaren@apple.com>
1448 Implemented JSFunctionMakeWithBody, which parses a script as a function body
1449 in the global scope, and returns the resulting anonymous function.
1451 I also removed private data from JSCallbackFunction. It never worked,
1452 since JSCallbackFunction doesn't inherit from JSCallbackObject.
1454 * API/JSCallbackConstructor.cpp: Removed.
1455 * API/JSCallbackConstructor.h: Removed.
1456 * API/JSCallbackFunction.cpp:
1457 (KJS::JSCallbackFunction::JSCallbackFunction):
1458 (KJS::JSCallbackFunction::implementsConstruct):
1459 (KJS::JSCallbackFunction::construct):
1460 (KJS::JSCallbackFunction::implementsCall):
1461 (KJS::JSCallbackFunction::callAsFunction):
1462 * API/JSCallbackFunction.h:
1463 * API/JSCallbackObject.cpp:
1464 (KJS::JSCallbackObject::staticFunctionGetter):
1465 * API/JSObjectRef.cpp:
1467 (JSFunctionMakeWithCallbacks):
1468 * API/JSObjectRef.h:
1474 * JavaScriptCore.exp: Programmatically added all symbols exported by
1475 API object files, and sorted results
1476 * JavaScriptCore.xcodeproj/project.pbxproj:
1478 2006-07-03 Geoffrey Garen <ggaren@apple.com>
1482 - Return syntax error in JSCheckSyntax through a JSValueRef* exception
1486 * API/JSContextRef.cpp:
1490 * JavaScriptCore.exp:
1491 * kjs/interpreter.cpp:
1492 (KJS::Interpreter::checkSyntax):
1493 * kjs/interpreter.h:
1495 2006-07-04 Darin Adler <darin@apple.com>
1499 * wtf/MathExtras.h: Oops. Added missing #endif.
1501 2006-07-04 Bjoern Graf <bjoern.graf@gmail.com>
1504 Tweaked a bit by Darin.
1506 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9678
1507 work around MSVCRT's fmod function returning NaN for fmod(x, infinity) instead of x
1509 * wtf/MathExtras.h: Added include of <float.h>.
1510 (isinf): Fix to return false for NAN.
1511 (wtf_fmod): Added. An inline that works around the bug.
1514 * kjs/number_object.cpp:
1515 * kjs/operations.cpp:
1517 Added includes of MathExtras.h to all files using fmod.
1519 * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode 2.3 have its way with
1522 2006-07-01 Geoffrey Garen <ggaren@apple.com>
1526 - Refined value conversions in the API:
1527 - failed toNumber returns NaN
1528 - failed toObject returns NULL
1529 - failed toString returns empty string
1531 - Refined excpetion handling in the API:
1532 - failed value conversions do not throw exceptions
1533 - uncaught exceptions in JSEvaluate, JSObjectCallAsFunction, and
1534 JSObjectCallAsConstructor are returned through a JSValueRef* exception
1536 - removed JSContextHasException, because JSContextGetException does
1540 * API/JSCharBufferRef.cpp:
1541 (JSValueCopyStringValue):
1542 * API/JSContextRef.cpp:
1544 * API/JSContextRef.h:
1545 * API/JSNodeList.c: Added test code demonstrating how you would use
1546 toNumber, and why you probably don't need toUInt32, etc.
1547 (JSNodeListPrototype_item):
1548 (JSNodeList_getProperty):
1549 * API/JSObjectRef.cpp:
1551 (JSObjectCallAsFunction):
1552 (JSObjectCallAsConstructor):
1553 * API/JSObjectRef.h:
1554 * API/JSValueRef.cpp:
1560 (main): Added tests for new rules, and call to JSGCProtect to fix Intel
1562 * JavaScriptCore.exp:
1564 2006-07-03 Darin Adler <darin@apple.com>
1566 - Rolled out HashMap implementation of NPRuntime, at least temporarily.
1568 Fixes hang in the bindings section of layout tests seen on the
1571 This code was using HashMap<const char*, PrivateIdentifier*>.
1572 But that hashes based on pointer identity, not string value.
1573 The default hash for any pointer type is to hash based on the pointer.
1574 And WTF doesn't currently have a string hash for char*.
1575 We'll need to fix that before re-landing this patch.
1577 (Formatting was also incorrect -- extra spaces in parentheses.)
1579 * bindings/npruntime.cpp: Rolled out last change.
1581 2006-07-02 Justin Haygood <jhaygood@spsu.edu>
1583 Reviewed, tweaked, landed by ggaren.
1585 - Port NPRuntime from CFDictionary to HashMap.
1587 * bindings/npruntime.cpp:
1588 (getStringIdentifierDictionary):
1589 (getIntIdentifierDictionary):
1590 (_NPN_GetStringIdentifier):
1591 (_NPN_GetIntIdentifier):
1592 * bindings/npruntime.h:
1594 2006-07-01 Geoffrey Garen <ggaren@apple.com>
1598 - Fixed <rdar://problem/4611197> REGRESSION: Liveconnect with Java test
1599 fails at http://www-sor.inria.fr/~dedieu/notes/liveconnect/simple_example.html
1601 * JavaScriptCore.exp: Export symbols used by liveconnect
1603 2006-06-29 Geoffrey Garen <ggaren@apple.com>
1607 - Phase 2 in the JS API.
1609 - Added support for specifying static tables of values -- this should
1610 obviate the need for using complicated callbacks for most lookups.
1612 - API objects are now created with classes (JSClassRef) -- in order to support
1613 static values, and in order to prevent API objects from storing their
1614 data inline, and thus falling into the oversized (read: slow and prone to
1615 giving Maciej the frowny face) heap.
1617 - Added two specialized JSObject subclasses -- JSCallbackFunction and JSCallbackConstructor --
1618 to allow JSFunctionMake and JSConstructorMake to continue to work with
1619 the new class model. Another solution to this problem would be to create
1620 a custom class object for each function and constructor you make. This
1621 solution is more code but also more efficient.
1623 - Substantially beefed up the minidom example to demonstrate and test a
1624 lot of these techniques. Its output is still pretty haphazard, though.
1626 - Gave the <kjs/ preface to some includes -- I'm told this matters to
1627 building on some versions of Linux.
1629 - Implemented JSValueIsInstanceOf and JSValueIsObjectOfClass
1631 - Removed GetDescription callback. Something in the class datastructure
1632 should take care of this.
1635 * API/JSCallbackConstructor.cpp: Added.
1637 (KJS::JSCallbackConstructor::JSCallbackConstructor):
1638 (KJS::JSCallbackConstructor::implementsConstruct):
1639 (KJS::JSCallbackConstructor::construct):
1640 (KJS::JSCallbackConstructor::setPrivate):
1641 (KJS::JSCallbackConstructor::getPrivate):
1642 * API/JSCallbackConstructor.h: Added.
1643 (KJS::JSCallbackConstructor::classInfo):
1644 * API/JSCallbackFunction.cpp: Added.
1646 (KJS::JSCallbackFunction::JSCallbackFunction):
1647 (KJS::JSCallbackFunction::implementsCall):
1648 (KJS::JSCallbackFunction::callAsFunction):
1649 (KJS::JSCallbackFunction::setPrivate):
1650 (KJS::JSCallbackFunction::getPrivate):
1651 * API/JSCallbackFunction.h: Added.
1652 (KJS::JSCallbackFunction::classInfo):
1653 * API/JSCallbackObject.cpp:
1655 (KJS::JSCallbackObject::JSCallbackObject):
1656 (KJS::JSCallbackObject::init):
1657 (KJS::JSCallbackObject::~JSCallbackObject):
1658 (KJS::JSCallbackObject::className):
1659 (KJS::JSCallbackObject::getOwnPropertySlot):
1660 (KJS::JSCallbackObject::put):
1661 (KJS::JSCallbackObject::deleteProperty):
1662 (KJS::JSCallbackObject::implementsConstruct):
1663 (KJS::JSCallbackObject::construct):
1664 (KJS::JSCallbackObject::implementsCall):
1665 (KJS::JSCallbackObject::callAsFunction):
1666 (KJS::JSCallbackObject::getPropertyList):
1667 (KJS::JSCallbackObject::toBoolean):
1668 (KJS::JSCallbackObject::toNumber):
1669 (KJS::JSCallbackObject::toString):
1670 (KJS::JSCallbackObject::inherits):
1671 (KJS::JSCallbackObject::staticValueGetter):
1672 (KJS::JSCallbackObject::staticFunctionGetter):
1673 (KJS::JSCallbackObject::callbackGetter):
1674 * API/JSCallbackObject.h:
1675 * API/JSCharBufferRef.cpp:
1676 * API/JSClassRef.cpp: Added.
1680 * API/JSClassRef.h: Added.
1681 (StaticValueEntry::StaticValueEntry):
1682 (StaticFunctionEntry::StaticFunctionEntry):
1683 (__JSClass::__JSClass):
1684 * API/JSContextRef.cpp:
1687 * API/JSContextRef.h:
1688 * API/JSNode.c: Added.
1689 (JSNodePrototype_appendChild):
1690 (JSNodePrototype_removeChild):
1691 (JSNodePrototype_replaceChild):
1692 (JSNodePrototype_class):
1693 (JSNode_getNodeType):
1694 (JSNode_getChildNodes):
1695 (JSNode_getFirstChild):
1701 * API/JSNode.h: Added.
1702 * API/JSNodeList.c: Added.
1703 (JSNodeListPrototype_item):
1704 (JSNodeListPrototype_class):
1705 (JSNodeList_length):
1706 (JSNodeList_getProperty):
1707 (JSNodeList_finalize):
1709 (JSNodeList_prototype):
1711 * API/JSNodeList.h: Added.
1712 * API/JSObjectRef.cpp:
1715 (JSConstructorMake):
1716 (__JSPropertyEnumerator::__JSPropertyEnumerator):
1717 (JSObjectCreatePropertyEnumerator):
1718 (JSPropertyEnumeratorGetNext):
1719 (JSPropertyEnumeratorRetain):
1720 (JSPropertyEnumeratorRelease):
1721 * API/JSObjectRef.h:
1722 (__JSObjectCallbacks::):
1723 * API/JSValueRef.cpp:
1724 (JSValueIsObjectOfClass):
1725 (JSValueIsInstanceOf):
1727 * API/Node.c: Added.
1731 (Node_replaceChild):
1734 * API/Node.h: Added.
1735 * API/NodeList.c: Added.
1741 * API/NodeList.h: Added.
1745 (createStringWithContentsOfFile):
1748 (assertEqualsAsCharacters):
1749 (MyObject_getProperty):
1751 (myConstructor_callAsConstructor):
1754 * JavaScriptCore.xcodeproj/project.pbxproj:
1756 2006-06-26 Kevin Ollivier <kevino@theolliviers.com>
1758 Reviewed and tweaked by Darin.
1760 - Compile fixes for wx port / gcc 4.0.2
1762 * kjs/array_object.cpp:
1763 Added missing headers.
1766 gcc needs class prototypes before defining those classes as friend classes
1768 2006-06-30 Mike Emmel <mike.emmel@gmail.com>
1772 Compilation fixes for Linux/Gdk.
1774 * JavaScriptCore/kjs/interpreter.cpp: added include of signal.h
1775 * JavaScriptCore/kjs/ExecState.h: added missing class declaration
1776 * JavaScriptCore/kjs/ExecState.cpp: case wrong on include of context.h
1777 * JavaScriptCore/JavaScriptCoreSources.bkl: added Context.cpp and ExecState.cpp
1779 === Safari-521.14 ===
1781 2006-06-29 Maciej Stachowiak <mjs@apple.com>
1785 - add headerdoc comments to some of the new JS API headers
1790 2006-06-28 Timothy Hatcher <timothy@apple.com>
1792 Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
1794 * JavaScriptCore.xcodeproj/project.pbxproj:
1796 2006-06-27 Timothy Hatcher <timothy@apple.com>
1800 <rdar://problem/4448350> Deprecated ObjC language API used in JavaScriptCore, WebCore, WebKit and WebBrowser
1802 Switch to the new ObjC 2 API, ifdefed the old code around OBJC_API_VERSION so it still works on Tiger.
1803 Removed the use of the old stringWithCString, switched to the new Tiger version that accepts an encoding.
1804 Lots of code style cleanup.
1806 * JavaScriptCore.xcodeproj/project.pbxproj:
1807 * bindings/objc/objc_class.h:
1808 * bindings/objc/objc_class.mm:
1809 (KJS::Bindings::ObjcClass::~ObjcClass):
1810 (KJS::Bindings::_createClassesByIsAIfNecessary):
1811 (KJS::Bindings::ObjcClass::classForIsA):
1812 (KJS::Bindings::ObjcClass::name):
1813 (KJS::Bindings::ObjcClass::methodsNamed):
1814 (KJS::Bindings::ObjcClass::fieldNamed):
1815 (KJS::Bindings::ObjcClass::fallbackObject):
1816 * bindings/objc/objc_header.h:
1817 * bindings/objc/objc_instance.h:
1818 * bindings/objc/objc_instance.mm:
1819 (ObjcInstance::ObjcInstance):
1820 (ObjcInstance::~ObjcInstance):
1821 (ObjcInstance::operator=):
1822 (ObjcInstance::begin):
1823 (ObjcInstance::end):
1824 (ObjcInstance::getClass):
1825 (ObjcInstance::invokeMethod):
1826 (ObjcInstance::invokeDefaultMethod):
1827 (ObjcInstance::setValueOfField):
1828 (ObjcInstance::supportsSetValueOfUndefinedField):
1829 (ObjcInstance::setValueOfUndefinedField):
1830 (ObjcInstance::getValueOfField):
1831 (ObjcInstance::getValueOfUndefinedField):
1832 (ObjcInstance::defaultValue):
1833 (ObjcInstance::stringValue):
1834 (ObjcInstance::numberValue):
1835 (ObjcInstance::booleanValue):
1836 (ObjcInstance::valueOf):
1837 * bindings/objc/objc_runtime.h:
1838 * bindings/objc/objc_runtime.mm:
1839 (ObjcMethod::ObjcMethod):
1841 (ObjcMethod::getMethodSignature):
1842 (ObjcMethod::setJavaScriptName):
1845 (ObjcField::valueFromInstance):
1846 (convertValueToObjcObject):
1847 (ObjcField::setValueToInstance):
1848 (ObjcArray::operator=):
1849 (ObjcArray::setValueAt):
1850 (ObjcArray::valueAt):
1851 (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
1852 (ObjcFallbackObjectImp::callAsFunction):
1853 (ObjcFallbackObjectImp::defaultValue):
1855 2006-06-28 Anders Carlsson <acarlsson@apple.com>
1859 http://bugzilla.opendarwin.org/show_bug.cgi?id=8636
1860 REGRESSION: JavaScript access to Java applet causes hang (_webViewURL not implemented)
1862 * bindings/jni/jni_objc.mm:
1863 (KJS::Bindings::dispatchJNICall):
1864 Just pass nil as the calling URL. This will cause the Java plugin to use the URL of the page
1865 containing the applet (which is what we used to do).
1867 2006-06-27 Timothy Hatcher <timothy@apple.com>
1871 <rdar://problem/4406785> Add an export file to TOT JavaScriptCore like the Safari-2-0-branch
1873 * JavaScriptCore.exp: Added.
1874 * JavaScriptCore.xcodeproj/project.pbxproj:
1876 2006-06-25 Geoffrey Garen <ggaren@apple.com>
1880 - Added JSConstructorMake to match JSFunctionMake, along with test code.
1882 [ I checked in the ChangeLog before without the actual files. ]
1884 * API/JSObjectRef.cpp:
1885 (JSConstructorMake):
1886 * API/JSObjectRef.h:
1888 (myConstructor_callAsConstructor):
1892 * JavaScriptCore.xcodeproj/project.pbxproj: Moved testapi.c to the testapi
1893 target -- this was an oversight in my earlier check-in.
1895 2006-06-25 Timothy Hatcher <timothy@apple.com>
1899 Bug 9574: Drosera should show inline scripts within the original HTML
1900 http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
1902 Pass the starting line number and error message to the debugger.
1905 (Debugger::sourceParsed):
1908 (KJS::GlobalFuncImp::callAsFunction):
1909 * kjs/function_object.cpp:
1910 (FunctionObjectImp::construct):
1911 * kjs/interpreter.cpp:
1912 (KJS::Interpreter::evaluate):
1914 2006-06-24 Alexey Proskuryakov <ap@nypop.com>
1916 Rubber-stamped by Eric.
1918 Add a -h (do not follow symlinks) option to ln in derived sources build script (without it,
1919 a symlink was created inside the source directory on second build).
1921 * JavaScriptCore.xcodeproj/project.pbxproj:
1923 2006-06-24 David Kilzer <ddkilzer@kilzer.net>
1925 Reviewed by Timothy.
1927 * Info.plist: Fixed copyright to include 2003-2006.
1929 2006-06-24 Alexey Proskuryakov <ap@nypop.com>
1933 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9418
1934 WebKit will not build when Space exists in path
1936 * JavaScriptCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to
1937 avoid passing paths with spaces to make.
1939 2006-06-23 Timothy Hatcher <timothy@apple.com>
1943 Adding more operator[] overloads for long and short types.
1946 (WTF::Vector::operator[]):
1948 === JavaScriptCore-521.13 ===
1950 2006-06-22 Alexey Proskuryakov <ap@nypop.com>
1954 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9539
1955 Another case error preventing build
1957 * API/JSObjectRef.cpp: Changed "identifier.h" to "Identifier.h"
1959 2006-06-22 David Kilzer <ddkilzer@kilzer.net>
1963 http://bugzilla.opendarwin.org/show_bug.cgi?id=9539
1964 Another case error preventing build
1966 * API/APICast.h: Changed "UString.h" to "ustring.h".
1968 2006-06-21 Geoffrey Garen <ggaren@apple.com>
1970 Fixed release build, fixed accidental infinite recursion due to
1971 last minute global replace gone awry.
1976 (assertEqualsAsBoolean):
1977 (assertEqualsAsNumber):
1978 (assertEqualsAsUTF8String):
1979 (assertEqualsAsCharactersPtr):
1980 * JavaScriptCore.xcodeproj/project.pbxproj:
1982 2006-06-21 Geoffrey Garen <ggaren@apple.com>
1986 - First cut at C API to JavaScript. Includes a unit test, 'testapi.c',
1987 and the outline of a test app, 'minidom.c'.
1989 Includes one change to JSC internals: Rename propList to getPropertyList and have it
1990 take its target property list by reference so that subclasses can
1991 add properties to the list before calling through to their superclasses.
1993 Also, I just ran prepare-ChangeLog in about 10 seconds, and I would like
1994 to give a shout-out to that.
1996 * API/APICast.h: Added.
1999 * API/JSBase.h: Added.
2000 * API/JSCallbackObject.cpp: Added.
2002 (KJS::JSCallbackObject::JSCallbackObject):
2003 (KJS::JSCallbackObject::~JSCallbackObject):
2004 (KJS::JSCallbackObject::className):
2005 (KJS::JSCallbackObject::getOwnPropertySlot):
2006 (KJS::JSCallbackObject::put):
2007 (KJS::JSCallbackObject::deleteProperty):
2008 (KJS::JSCallbackObject::implementsConstruct):
2009 (KJS::JSCallbackObject::construct):
2010 (KJS::JSCallbackObject::implementsCall):
2011 (KJS::JSCallbackObject::callAsFunction):
2012 (KJS::JSCallbackObject::getPropertyList):
2013 (KJS::JSCallbackObject::toBoolean):
2014 (KJS::JSCallbackObject::toNumber):
2015 (KJS::JSCallbackObject::toString):
2016 (KJS::JSCallbackObject::setPrivate):
2017 (KJS::JSCallbackObject::getPrivate):
2018 (KJS::JSCallbackObject::cachedValueGetter):
2019 (KJS::JSCallbackObject::callbackGetter):
2020 * API/JSCallbackObject.h: Added.
2021 (KJS::JSCallbackObject::classInfo):
2022 * API/JSCharBufferRef.cpp: Added.
2024 (JSCharBufferCreate):
2025 (JSCharBufferCreateUTF8):
2026 (JSCharBufferRetain):
2027 (JSCharBufferRelease):
2028 (JSValueCopyStringValue):
2029 (JSCharBufferGetLength):
2030 (JSCharBufferGetCharactersPtr):
2031 (JSCharBufferGetCharacters):
2032 (JSCharBufferGetMaxLengthUTF8):
2033 (JSCharBufferGetCharactersUTF8):
2034 (JSCharBufferIsEqual):
2035 (JSCharBufferIsEqualUTF8):
2036 (JSCharBufferCreateWithCFString):
2037 (CFStringCreateWithJSCharBuffer):
2038 * API/JSCharBufferRef.h: Added.
2039 * API/JSContextRef.cpp: Added.
2042 (JSContextGetGlobalObject):
2045 (JSContextHasException):
2046 (JSContextGetException):
2047 (JSContextClearException):
2048 (JSContextSetException):
2049 * API/JSContextRef.h: Added.
2050 * API/JSObjectRef.cpp: Added.
2054 (JSObjectGetDescription):
2055 (JSObjectGetPrototype):
2056 (JSObjectSetPrototype):
2057 (JSObjectHasProperty):
2058 (JSObjectGetProperty):
2059 (JSObjectSetProperty):
2060 (JSObjectDeleteProperty):
2061 (JSObjectGetPrivate):
2062 (JSObjectSetPrivate):
2063 (JSObjectIsFunction):
2064 (JSObjectCallAsFunction):
2065 (JSObjectIsConstructor):
2066 (JSObjectCallAsConstructor):
2067 (__JSPropertyListEnumerator::__JSPropertyListEnumerator):
2068 (JSObjectCreatePropertyEnumerator):
2069 (JSPropertyEnumeratorGetNext):
2070 (JSPropertyEnumeratorRetain):
2071 (JSPropertyEnumeratorRelease):
2072 (JSPropertyListAdd):
2073 * API/JSObjectRef.h: Added.
2074 * API/JSValueRef.cpp: Added.
2076 (JSValueIsUndefined):
2083 (JSValueIsStrictEqual):
2093 * API/JSValueRef.h: Added.
2094 * API/JavaScriptCore.h: Added.
2095 * API/minidom.c: Added.
2097 * API/minidom.html: Added.
2098 * API/minidom.js: Added.
2099 * API/testapi.c: Added.
2100 (assertEqualsAsBoolean):
2101 (assertEqualsAsNumber):
2102 (assertEqualsAsUTF8String):
2103 (assertEqualsAsCharactersPtr):
2104 (assertEqualsAsCharacters):
2105 (MyObject_initialize):
2106 (MyObject_copyDescription):
2107 (MyObject_hasProperty):
2108 (MyObject_getProperty):
2109 (MyObject_setProperty):
2110 (MyObject_deleteProperty):
2111 (MyObject_getPropertyList):
2112 (MyObject_callAsFunction):
2113 (MyObject_callAsConstructor):
2114 (MyObject_convertToType):
2115 (MyObject_finalize):
2116 (print_callAsFunction):
2118 (createStringWithContentsOfFile):
2119 * API/testapi.js: Added.
2121 * JavaScriptCore.xcodeproj/project.pbxproj:
2122 * bindings/npruntime_impl.h:
2123 * kjs/array_instance.h:
2124 * kjs/array_object.cpp:
2125 (ArrayInstance::getPropertyList):
2126 * kjs/interpreter.cpp:
2127 (KJS::Interpreter::evaluate):
2129 (ForInNode::execute):
2131 (KJS::JSObject::put):
2132 (KJS::JSObject::canPut):
2133 (KJS::JSObject::deleteProperty):
2134 (KJS::JSObject::propertyIsEnumerable):
2135 (KJS::JSObject::getPropertyAttributes):
2136 (KJS::JSObject::getPropertyList):
2138 * kjs/property_map.cpp:
2139 (KJS::PropertyMap::get):
2140 * kjs/property_map.h:
2141 * kjs/scope_chain.cpp:
2142 (KJS::ScopeChain::print):
2143 * kjs/string_object.cpp:
2144 (StringInstance::getPropertyList):
2145 * kjs/string_object.h:
2147 (KJS::UString::Rep::ref):
2149 2006-06-20 Timothy Hatcher <timothy@apple.com>
2153 Make sure we clear the exception before returning so
2154 that future calls will not fail because of an earlier
2155 exception state. Assert on entry that the WebScriptObject
2156 is working with an ExecState that dose not have an exception.
2157 Document that evaluateWebScript and callWebScriptMethod return
2158 WebUndefined when an exception is thrown.
2160 * bindings/objc/WebScriptObject.h:
2161 * bindings/objc/WebScriptObject.mm:
2162 (-[WebScriptObject callWebScriptMethod:withArguments:]):
2163 (-[WebScriptObject evaluateWebScript:]):
2164 (-[WebScriptObject setValue:forKey:]):
2165 (-[WebScriptObject valueForKey:]):
2166 (-[WebScriptObject removeWebScriptKey:]):
2167 (-[WebScriptObject webScriptValueAtIndex:]):
2168 (-[WebScriptObject setWebScriptValueAtIndex:value:]):
2170 2006-06-19 Anders Carlsson <acarlsson@apple.com>
2174 * kjs/interpreter.cpp:
2175 (KJS::TimeoutChecker::pauseTimeoutCheck):
2176 (KJS::TimeoutChecker::resumeTimeoutCheck):
2177 Fix argument order in setitimer calls.
2179 2006-06-18 Anders Carlsson <acarlsson@apple.com>
2183 * kjs/interpreter.cpp:
2184 (KJS::TimeoutChecker::pauseTimeoutCheck):
2185 Do nothing if the timeout check hasn't been started.
2187 (KJS::TimeoutChecker::resumeTimeoutCheck):
2188 Do nothing if the timeout check hasn't been started.
2189 Use the right signal handler when unblocking.
2191 (KJS::Interpreter::handleTimeout):
2192 pause/resume the timeout check around the call to
2193 shouldInterruptScript().
2195 2006-06-16 Ben Goodger <beng@google.com>
2199 http://bugzilla.opendarwin.org/show_bug.cgi?id=9491
2200 Windows build breaks in interpreter.cpp
2202 * kjs/interpreter.cpp
2203 (KJS::TimeoutChecker::pauseTimeoutCheck):
2204 (KJS::TimeoutChecker::resumeTimeoutCheck):
2205 Make sure to only assert equality with s_executingInterpreter when it
2206 is being used (i.e. when HAVE(SYS_TIME_H) == true)
2208 2006-06-17 David Kilzer <ddkilzer@kilzer.net>
2212 http://bugzilla.opendarwin.org/show_bug.cgi?id=9477
2213 REGRESSION: fast/dom/replaceChild.html crashes on WebKit ToT in debug build
2216 (KJS::FunctionImp::callAsFunction): Refetch the debugger after executing the function
2217 in case the WebFrame it was running in has since been destroyed.
2219 2006-06-17 David Kilzer <ddkilzer@kilzer.net>
2223 http://bugzilla.opendarwin.org/show_bug.cgi?id=9476
2224 REGRESSION: Reproducible crash after closing window after viewing
2225 css2.1/t0803-c5501-imrgn-t-00-b-ag.html
2228 (Debugger::detach): Call setDebugger(0) for all interpreters removed from
2229 the 'attached to a debugger' list.
2231 2006-06-17 Anders Carlsson <acarlsson@apple.com>
2233 Reviewed by Maciej and Geoff.
2235 http://bugzilla.opendarwin.org/show_bug.cgi?id=7080
2236 Provide some way to stop a JavaScript infinite loop
2240 Add Interrupted completion type.
2243 (KJS::FunctionImp::callAsFunction):
2244 (KJS::GlobalFuncImp::callAsFunction):
2245 Only set the exception on the new ExecState if the current one has had one.
2247 * kjs/interpreter.cpp:
2248 (KJS::TimeoutChecker::startTimeoutCheck):
2249 (KJS::TimeoutChecker::stopTimeoutCheck):
2250 (KJS::TimeoutChecker::alarmHandler):
2251 (KJS::TimeoutChecker::pauseTimeoutCheck):
2252 (KJS::TimeoutChecker::resumeTimeoutCheck):
2253 New TimeoutChecker class which handles setting Interpreter::m_timedOut flag after a given
2254 period of time. This currently only works on Unix platforms where setitimer and signals are used.
2256 (KJS::Interpreter::Interpreter):
2257 Initialize new member variables.
2259 (KJS::Interpreter::~Interpreter):
2260 Destroy the timeout checker.
2262 (KJS::Interpreter::startTimeoutCheck):
2263 (KJS::Interpreter::stopTimeoutCheck):
2264 (KJS::Interpreter::pauseTimeoutCheck):
2265 (KJS::Interpreter::resumeTimeoutCheck):
2266 Call the timeout checker.
2268 (KJS::Interpreter::handleTimeout):
2269 Called on timeout. Resets the m_timedOut flag and calls shouldInterruptScript.
2271 * kjs/interpreter.h:
2272 (KJS::Interpreter::setTimeoutTime):
2273 New function for setting the timeout time.
2275 (KJS::Interpreter::shouldInterruptScript):
2276 New function. The idea is that this should be overridden by subclasses in order to for example
2277 pop up a dialog asking the user if the script should be interrupted.
2279 (KJS::Interpreter::checkTimeout):
2280 New function which checks the m_timedOut flag and calls handleTimeout if it's set.
2283 (DoWhileNode::execute):
2284 (WhileNode::execute):
2286 Call Interpreter::checkTimeout after each iteration of the loop.
2288 2006-06-15 Timothy Hatcher <timothy@apple.com>
2290 Reviewed by Geoff and Darin.
2292 Prefer the DWARF debugging symbols format for use in Xcode 2.3.
2294 * JavaScriptCore.xcodeproj/project.pbxproj:
2296 2006-06-14 Geoffrey Garen <ggaren@apple.com>
2300 - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9438
2301 Someone broke ToT: cannot build
2303 * JavaScriptCore.xcodeproj/project.pbxproj:
2304 * bindings/runtime_root.h: Changed "Interpreter.h" to "interpreter.h"
2306 2006-06-12 Geoffrey Garen <ggaren@apple.com>
2310 * bindings/objc/WebScriptObject.mm:
2311 (+[WebScriptObject throwException:]): Restore assignment I accidentally
2312 deleted in previous commit
2314 2006-06-12 Geoffrey Garen <ggaren@apple.com>
2316 Reviewed by TimO, Maciej.
2318 - Merged InterpreterImp code into Interpreter, which implements
2319 all interpreter functionality now. This is part of my continuing quest
2320 to create an external notion of JS "execution context" that is unified and simple --
2321 something to replace the mix of Context, ContextImp, ExecState, Interpreter,
2322 InterpreterImp, and JSRun.
2324 All tests pass. Leaks test has not regressed from its baseline ~207 leaks
2325 with ~3460 leaked nodes.
2327 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2328 * JavaScriptCore.xcodeproj/project.pbxproj:
2329 * bindings/NP_jsobject.cpp:
2330 * bindings/objc/WebScriptObject.mm:
2331 (+[WebScriptObject throwException:]):
2332 * bindings/runtime_root.cpp:
2333 * bindings/runtime_root.h:
2335 (KJS::Context::Context):
2336 * kjs/ExecState.cpp: Added.
2337 (KJS::ExecState::lexicalInterpreter):
2338 * kjs/ExecState.h: Added.
2339 (KJS::ExecState::dynamicInterpreter):
2340 * kjs/SavedBuiltins.h: Added.
2341 * kjs/bool_object.cpp:
2342 (BooleanPrototype::BooleanPrototype):
2343 * kjs/collector.cpp:
2344 (KJS::Collector::collect):
2345 (KJS::Collector::numInterpreters):
2351 (KJS::FunctionImp::callAsFunction):
2352 (KJS::GlobalFuncImp::callAsFunction):
2353 * kjs/function_object.cpp:
2354 (FunctionObjectImp::construct):
2357 * kjs/interpreter.cpp:
2358 (KJS::interpreterMap):
2359 (KJS::Interpreter::Interpreter):
2360 (KJS::Interpreter::init):
2361 (KJS::Interpreter::~Interpreter):
2362 (KJS::Interpreter::globalObject):
2363 (KJS::Interpreter::initGlobalObject):
2364 (KJS::Interpreter::globalExec):
2365 (KJS::Interpreter::checkSyntax):
2366 (KJS::Interpreter::evaluate):
2367 (KJS::Interpreter::builtinObject):
2368 (KJS::Interpreter::builtinFunction):
2369 (KJS::Interpreter::builtinArray):
2370 (KJS::Interpreter::builtinBoolean):
2371 (KJS::Interpreter::builtinString):
2372 (KJS::Interpreter::builtinNumber):
2373 (KJS::Interpreter::builtinDate):
2374 (KJS::Interpreter::builtinRegExp):
2375 (KJS::Interpreter::builtinError):
2376 (KJS::Interpreter::builtinObjectPrototype):
2377 (KJS::Interpreter::builtinFunctionPrototype):
2378 (KJS::Interpreter::builtinArrayPrototype):
2379 (KJS::Interpreter::builtinBooleanPrototype):
2380 (KJS::Interpreter::builtinStringPrototype):
2381 (KJS::Interpreter::builtinNumberPrototype):
2382 (KJS::Interpreter::builtinDatePrototype):
2383 (KJS::Interpreter::builtinRegExpPrototype):
2384 (KJS::Interpreter::builtinErrorPrototype):
2385 (KJS::Interpreter::builtinEvalError):
2386 (KJS::Interpreter::builtinRangeError):
2387 (KJS::Interpreter::builtinReferenceError):
2388 (KJS::Interpreter::builtinSyntaxError):
2389 (KJS::Interpreter::builtinTypeError):
2390 (KJS::Interpreter::builtinURIError):
2391 (KJS::Interpreter::builtinEvalErrorPrototype):
2392 (KJS::Interpreter::builtinRangeErrorPrototype):
2393 (KJS::Interpreter::builtinReferenceErrorPrototype):
2394 (KJS::Interpreter::builtinSyntaxErrorPrototype):
2395 (KJS::Interpreter::builtinTypeErrorPrototype):
2396 (KJS::Interpreter::builtinURIErrorPrototype):
2397 (KJS::Interpreter::mark):
2398 (KJS::Interpreter::interpreterWithGlobalObject):
2399 (KJS::Interpreter::saveBuiltins):
2400 (KJS::Interpreter::restoreBuiltins):
2401 * kjs/interpreter.h:
2402 (KJS::Interpreter::setCompatMode):
2403 (KJS::Interpreter::compatMode):
2404 (KJS::Interpreter::firstInterpreter):
2405 (KJS::Interpreter::nextInterpreter):
2406 (KJS::Interpreter::prevInterpreter):
2407 (KJS::Interpreter::debugger):
2408 (KJS::Interpreter::setDebugger):
2409 (KJS::Interpreter::setContext):
2410 (KJS::Interpreter::context):
2412 (StatementNode::hitStatement):
2413 (RegExpNode::evaluate):
2416 2006-06-12 Geoffrey Garen <ggaren@apple.com>
2420 - Have *.lut.h files #include lookup.h to eliminate surprising header
2421 include order dependency.
2423 * DerivedSources.make:
2424 * kjs/array_object.cpp:
2425 * kjs/date_object.cpp:
2426 * kjs/date_object.h:
2427 (KJS::DateProtoFunc::):
2429 * kjs/math_object.cpp:
2430 * kjs/number_object.cpp:
2431 * kjs/regexp_object.cpp:
2432 * kjs/string_object.cpp:
2434 2006-06-10 Geoffrey Garen <ggaren@apple.com>
2436 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8515
2437 Linux porting compile bug
2439 Fix by Mike Emmel, Reviewed by Darin.
2441 * JavaScriptCoreSources.bkl:
2445 2006-06-09 Geoffrey Garen <ggaren@apple.com>
2447 Build fix -- I think :).
2449 * JavaScriptCore.xcodeproj/project.pbxproj:
2452 2006-06-09 Geoffrey Garen <ggaren@apple.com>
2454 Reviewed by Eric (yay!).
2456 - Removed Context wrapper for ContextImp, renamed ContextImp to Context,
2457 split Context into its own file -- Context.cpp -- renamed _var to m_var,
2458 change ' *' to '* '.
2460 * JavaScriptCore.xcodeproj/project.pbxproj:
2461 * kjs/Context.cpp: Added.
2462 (KJS::Context::Context):
2463 (KJS::Context::~Context):
2464 (KJS::Context::mark):
2466 (KJS::Context::scopeChain):
2467 (KJS::Context::variableObject):
2468 (KJS::Context::setVariableObject):
2469 (KJS::Context::thisValue):
2470 (KJS::Context::callingContext):
2471 (KJS::Context::activationObject):
2472 (KJS::Context::currentBody):
2473 (KJS::Context::function):
2474 (KJS::Context::arguments):
2475 (KJS::Context::pushScope):
2476 (KJS::Context::seenLabels):
2478 (KJS::FunctionImp::callAsFunction):
2479 (KJS::FunctionImp::processParameters):
2480 (KJS::FunctionImp::argumentsGetter):
2481 (KJS::GlobalFuncImp::callAsFunction):
2483 (KJS::InterpreterImp::evaluate):
2485 (KJS::InterpreterImp::setContext):
2486 (KJS::InterpreterImp::context):
2487 * kjs/interpreter.cpp:
2488 * kjs/interpreter.h:
2489 (KJS::ExecState::context):
2490 (KJS::ExecState::ExecState):
2494 (ThisNode::evaluate):
2495 (ResolveNode::evaluate):
2496 (FunctionCallResolveNode::evaluate):
2497 (PostfixResolveNode::evaluate):
2498 (DeleteResolveNode::evaluate):
2499 (TypeOfResolveNode::evaluate):
2500 (PrefixResolveNode::evaluate):
2501 (AssignResolveNode::evaluate):
2502 (VarDeclNode::evaluate):
2503 (VarDeclNode::processVarDecls):
2504 (DoWhileNode::execute):
2505 (WhileNode::execute):
2507 (ForInNode::execute):
2508 (ContinueNode::execute):
2509 (BreakNode::execute):
2510 (ReturnNode::execute):
2511 (WithNode::execute):
2512 (SwitchNode::execute):
2513 (LabelNode::execute):
2515 (FuncDeclNode::processFuncDecl):
2516 (FuncExprNode::evaluate):
2518 2006-06-07 Geoffrey Garen <ggaren@apple.com>
2520 Removed API directory I prematurely/accidentally added.
2524 2006-06-05 Mitz Pettel <opendarwin.org@mitzpettel.com>
2526 Reviewed and landed by Geoff.
2528 - fix a regression in ecma_3/String/regress-104375.js
2530 * kjs/string_object.cpp:
2531 (substituteBackreferences): If a 2-digit back reference is out of range,
2532 parse it as a 1-digit reference (followed by the other digit). This matches
2535 2006-06-05 Geoffrey Garen <ggaren@apple.com>
2538 Darin already reviewed this change on the branch. See <rdar://problem/4317701>.
2540 - Fixed <rdar://problem/4291345> PCRE overflow in Safari JavaScriptCore
2542 No test case because there's no behavior change.
2544 * pcre/pcre_compile.c:
2545 (read_repeat_counts): Check for integer overflow / out of bounds
2547 2006-06-05 Geoffrey Garen <ggaren@apple.com>
2551 - Changed CString length from int to size_t. We sould probably do this
2552 for UString, too. (Darin, if you're reading this: Maciej said so.)
2557 (KJS::CString::CString):
2560 (KJS::CString::size):
2562 2006-06-04 Geoffrey Garen <ggaren@apple.com>
2566 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9304
2567 Minor cleanup in JavaScriptCore
2569 * kjs/value.h: Removed redundant declarations
2571 2006-06-04 Darin Adler <darin@apple.com>
2575 - changed deleteAllValues so it can work on "const" collections
2576 Deleting the values affects the values, not the pointers in the
2577 collection, so it's legitimate to do it to a const collection,
2578 and a case of that actually came up in the XPath code.
2581 (WTF::deleteAllPairSeconds): Use const iterators.
2582 (WTF::deleteAllValues): Take const HashMap reference as a parameter.
2584 (WTF::deleteAllValues): Take const HashSet reference as a parameter,
2585 and use const iterators.
2587 (WTF::deleteAllValues): Take const Vector reference as a parameter.
2589 - added more functions that are present in <math.h> on some platforms,
2590 but not on others; moved here from various files in WebCore
2601 2006-06-02 Mitz Pettel <opendarwin.org@mitzpettel.com>
2605 - http://bugzilla.opendarwin.org/show_bug.cgi?id=9234
2606 Implement $&, $' and $` replacement codes in String.prototype.replace
2608 Test: fast/js/string-replace-3.html
2610 * kjs/string_object.cpp:
2611 (substituteBackreferences): Added support for $& (matched substring),
2612 $` (everything preceding matched substring), $' (everything following
2613 matched substring) and 2-digit back references, and cleaned up a little.
2615 2006-06-02 Adele Peterson <adele@apple.com>
2619 Set incremental linking to no. This seems to fix a build problem I was seeing
2620 where dftables couldn't find a dll.
2622 * JavaScriptCore.vcproj/dftables/dftables.vcproj:
2624 2006-05-26 Steve Falkenburg <sfalken@apple.com>
2628 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2630 === JavaScriptCore-521.11 ===
2632 2006-05-24 Geoffrey Garen <ggaren@apple.com>
2636 - JSC half of fix for <rdar://problem/4557926> TOT REGRESSSION: Crash
2637 occurs when attempting to view image in slideshow mode at
2638 http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute
2639 (KJS::ExecState*) + 312)
2641 On alternate threads, DOMObjects remain in the
2642 ScriptInterpreter's cache because they're not collected. So, they
2643 need an opportunity to mark their children.
2645 I'm not particularly happy with this solution because it fails to
2646 resolve many outstanding issues with the DOM object cache. Since none
2647 of those issues is a crasher or a serious compatibility concern,
2648 and since the behavior of other browsers is not much to go on in this
2649 case, I've filed <rdar://problem/4561439> about that, and I'm moving on
2652 * JavaScriptCore.xcodeproj/project.pbxproj:
2653 * kjs/collector.cpp:
2654 (KJS::Collector::collect):
2656 (KJS::InterpreterImp::mark):
2658 * kjs/interpreter.cpp:
2659 (KJS::Interpreter::mark):
2660 * kjs/interpreter.h:
2662 === JavaScriptCore-521.10 ===
2664 2006-05-22 Timothy Hatcher <timothy@apple.com>
2666 Reviewed by Eric, Kevin and Geoff.
2668 Merge open source build fixes. <rdar://problem/4555500>
2670 * kjs/collector.cpp: look at the rsp register in x86_64
2671 (KJS::Collector::markOtherThreadConservatively):
2672 * wtf/Platform.h: add x86_64 to the platform list
2674 2006-05-19 Anders Carlsson <acarlsson@apple.com>
2678 http://bugzilla.opendarwin.org/show_bug.cgi?id=8993
2679 Support function declaration in case statements
2681 * kjs/grammar.y: Get rid of StatementList and use SourceElements instead.
2684 (CaseClauseNode::evalStatements):
2685 (CaseClauseNode::processVarDecls):
2686 (CaseClauseNode::processFuncDecl):
2687 (ClauseListNode::processFuncDecl):
2688 (CaseBlockNode::processFuncDecl):
2689 (SwitchNode::processFuncDecl):
2691 (KJS::CaseClauseNode::CaseClauseNode):
2692 (KJS::ClauseListNode::ClauseListNode):
2693 (KJS::ClauseListNode::getClause):
2694 (KJS::ClauseListNode::getNext):
2695 (KJS::ClauseListNode::releaseNext):
2696 (KJS::SwitchNode::SwitchNode):
2697 Add processFuncDecl for the relevant nodes.
2699 * kjs/nodes2string.cpp:
2700 (CaseClauseNode::streamTo):
2701 next got renamed to source.
2703 2006-05-17 George Staikos <staikos@kde.org>
2705 Reviewed by Maciej, Alexey, and Eric.
2707 * pcre/pcre_compile.c:
2710 * wtf/UnusedParam.h:
2711 Use /**/ in .c files to compile with non-C99 and non-GCC compilers.
2714 Change include to <wtf/HashTraits.h> from "HashTraits.h" to avoid -I
2716 * wtf/unicode/qt4/UnicodeQt4.h:
2717 Use correct parentheses and correct mask for utf-32 support.
2719 2006-05-17 Alexey Proskuryakov <ap@nypop.com>
2723 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8870
2724 Crash typing in Yahoo auto-complete widget.
2726 Test: fast/js/regexp-stack-overflow.html
2728 * pcre/pcre-config.h: Define NO_RECURSE.
2730 2006-05-16 George Staikos <staikos@kde.org>
2734 Fix some warnings and strict compilation errors.
2739 2006-05-15 Alexey Proskuryakov <ap@nypop.com>
2741 * make-generated-sources.sh: Changed to be executable and removed
2742 text in the file generated by "svn diff".
2744 2006-05-15 Geoffrey Garen <ggaren@apple.com>
2748 - Fixed <rdar://problem/4534904> please do not treat "debugger" as
2749 a reserved word while parsing JavaScript (and other ECMA reserved
2754 http://bugzilla.opendarwin.org/show_bug.cgi?id=6179
2755 We treat "char" as a reserved word in JavaScript and firefox/IE do
2758 (1) I unreserved most of the spec's "future reserved words" because
2759 they're not reserved in IE or FF. (Most, but not all, because IE
2760 somewhat randomly *does* reserve a few of them.)
2761 (2) I made 'debugger' a legitimate statement that acts like an empty
2762 statement because FF and IE support it.
2765 * kjs/keywords.table:
2767 2006-05-15 Tim Omernick <timo@apple.com>
2769 Reviewed by John Sullivan.
2771 Part of <rdar://problem/4466508> Add 64-bit support to the Netscape Plugin API
2773 Added to the Netscape Plugin API the concept of "plugin drawing models". The drawing model
2774 determines the kind of graphics context created by the browser for the plugin, as well as
2775 the Mac types of various Netscape Plugin API data structures.
2777 There is a drawing model to represent the old QuickDraw-based API. It is used by default
2778 if QuickDraw is available on the system, unless the plugin specifies another drawing model.
2780 The big change is the addition of the CoreGraphics drawing model. A plugin may request this
2781 drawing model to obtain access to a CGContextRef for drawing, instead of a QuickDraw CGrafPtr.
2784 Define NP_NO_QUICKDRAW when compiling 64-bit; there is no 64-bit QuickDraw.
2785 Added NPNVpluginDrawingModel, NPNVsupportsQuickDrawBool, and NPNVsupportsCoreGraphicsBool
2787 Added NPDrawingModel enumeration. Currently the only drawing models are QuickDraw and
2789 NPRegion's type now depends on the drawing model specified by the plugin.
2790 NP_Port is now only defined when QuickDraw is available.
2791 Added NP_CGContext, which is the type of the NPWindow's "window" member in CoreGraphics mode.
2793 2006-05-13 Kevin M. Ollivier <kevino@theolliviers.com>
2795 Reviewed by Darin, landed by ap.
2797 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8528
2798 Bakefiles (and generated Makefiles) for wx and gdk ports
2800 * make-generated-sources.sh:
2801 Added script to configure environment to run DerivedSources.make
2803 * JavaScriptCoreSources.bkl:
2804 Added JavaScriptCore sources list for Bakefile.
2807 Bakefile used to generate JavaScriptCore project files
2808 (currently only used by wx and gdk ports)
2810 2006-05-09 Steve Falkenburg <sfalken@apple.com>
2813 Minor fixes to WTF headers.
2817 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Fix include dirs, paths to files.
2818 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Fix include dirs.
2819 * wtf/Assertions.h: include Platform.h to get definition for COMPILER()
2820 * wtf/Vector.h: include FastMalloc.h for definition of fastMalloc, fastFree
2822 2006-05-09 Maciej Stachowiak <mjs@apple.com>
2824 Rubber stamped by Anders.
2826 - renamed kxmlcore to wtf
2832 * JavaScriptCore.xcodeproj/project.pbxproj:
2833 * bindings/c/c_instance.cpp:
2834 * bindings/objc/WebScriptObject.mm:
2835 * kjs/JSImmediate.h:
2838 * kjs/array_object.cpp:
2839 * kjs/collector.cpp:
2840 (KJS::Collector::registerThread):
2844 (KJS::isStrWhiteSpace):
2846 * kjs/identifier.cpp:
2851 (Lexer::isWhiteSpace):
2852 (Lexer::isIdentStart):
2853 (Lexer::isIdentPart):
2857 * kjs/number_object.cpp:
2859 * kjs/property_map.cpp:
2860 * kjs/property_map.h:
2861 * kjs/string_object.cpp:
2862 (StringProtoFunc::callAsFunction):
2867 * kxmlcore: Removed.
2868 * kxmlcore/AlwaysInline.h: Removed.
2869 * kxmlcore/Assertions.cpp: Removed.
2870 * kxmlcore/Assertions.h: Removed.
2871 * kxmlcore/FastMalloc.cpp: Removed.
2872 * kxmlcore/FastMalloc.h: Removed.
2873 * kxmlcore/FastMallocInternal.h: Removed.
2874 * kxmlcore/Forward.h: Removed.
2875 * kxmlcore/HashCountedSet.h: Removed.
2876 * kxmlcore/HashFunctions.h: Removed.
2877 * kxmlcore/HashMap.h: Removed.
2878 * kxmlcore/HashSet.h: Removed.
2879 * kxmlcore/HashTable.cpp: Removed.
2880 * kxmlcore/HashTable.h: Removed.
2881 * kxmlcore/HashTraits.h: Removed.
2882 * kxmlcore/ListRefPtr.h: Removed.
2883 * kxmlcore/Noncopyable.h: Removed.
2884 * kxmlcore/OwnArrayPtr.h: Removed.
2885 * kxmlcore/OwnPtr.h: Removed.
2886 * kxmlcore/PassRefPtr.h: Removed.
2887 * kxmlcore/Platform.h: Removed.
2888 * kxmlcore/RefPtr.h: Removed.
2889 * kxmlcore/TCPageMap.h: Removed.
2890 * kxmlcore/TCSpinLock.h: Removed.
2891 * kxmlcore/TCSystemAlloc.cpp: Removed.
2892 * kxmlcore/TCSystemAlloc.h: Removed.
2893 * kxmlcore/UnusedParam.h: Removed.
2894 * kxmlcore/Vector.h: Removed.
2895 * kxmlcore/VectorTraits.h: Removed.
2896 * kxmlcore/unicode: Removed.
2897 * kxmlcore/unicode/Unicode.h: Removed.
2898 * kxmlcore/unicode/UnicodeCategory.h: Removed.
2899 * kxmlcore/unicode/icu: Removed.
2900 * kxmlcore/unicode/icu/UnicodeIcu.h: Removed.
2901 * kxmlcore/unicode/posix: Removed.
2902 * kxmlcore/unicode/qt3: Removed.
2903 * kxmlcore/unicode/qt4: Removed.
2904 * kxmlcore/unicode/qt4/UnicodeQt4.h: Removed.
2907 * wtf/Assertions.cpp:
2909 * wtf/FastMalloc.cpp:
2910 (WTF::TCMalloc_ThreadCache::Scavenge):
2913 (WTF::TCMallocGuard::TCMallocGuard):
2920 * wtf/FastMallocInternal.h:
2922 * wtf/HashCountedSet.h:
2923 * wtf/HashFunctions.h:
2926 * wtf/HashTable.cpp:
2930 * wtf/Noncopyable.h:
2931 * wtf/OwnArrayPtr.h:
2935 * wtf/TCSystemAlloc.cpp:
2936 (TCMalloc_SystemAlloc):
2938 * wtf/VectorTraits.h:
2939 * wtf/unicode/UnicodeCategory.h:
2940 * wtf/unicode/icu/UnicodeIcu.h:
2942 2006-05-08 Timothy Hatcher <timothy@apple.com>
2946 * bindings/npapi.h: do not define #pragma options align=mac68k if we are 64-bit
2948 2006-05-07 Darin Adler <darin@apple.com>
2950 Reviewed and landed by Maciej.
2952 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8765
2953 Random crashes on TOT since the form state change
2955 I haven't figured out how to construct a test for this, but this does seem to fix the
2956 problem; Mitz mentioned that a double-destroy was occurring in these functions.
2958 * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use RefCounter::deref instead of calling
2959 ~ValueType, because ~ValueType often results in a double-destroy, since the HashTable also
2960 destroys the element based on the storage type. The RefCounter template correctly does work
2961 only in cases where ValueType and ValueStorageType differ and this class is what's used
2962 elsewhere for the same purpose; I somehow missed this case when optimizing HashMap.
2963 * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto.
2965 2006-05-05 Darin Adler <darin@apple.com>
2967 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8722
2968 IE compatibility fix in date parsing
2970 * kjs/date_object.cpp: (KJS::parseDate): Merged change that George Staikos provided
2971 from KDE 3.4.3 branch that allows day values of 0 and values that are > 1000.
2973 2006-05-04 Anders Carlsson <andersca@mac.com>
2977 http://bugzilla.opendarwin.org/show_bug.cgi?id=8734
2978 Would like a Vector::append that takes another Vector
2980 * kxmlcore/Vector.h:
2981 (KXMLCore::::append):
2982 New function that takes another array.
2984 2006-05-02 Steve Falkenburg <sfalken@apple.com>
2988 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: set NDEBUG for release build
2989 * kxmlcore/FastMalloc.cpp: Prevent USE_SYSTEM_MALLOC from being defined twice
2991 2006-05-02 Anders Carlsson <andersca@mac.com>
2995 * kxmlcore/HashMap.h:
2996 (KXMLCore::::operator):
2999 2006-05-01 Tim Omernick <timo@apple.com>
3001 Reviewed by Tim Hatcher.
3003 <rdar://problem/4476875> Support printing for embedded Netscape plugins
3006 Fixed struct alignment problem in our npapi.h. Structs must be 68k-aligned on both pre-Mac OS X
3007 and Mac OS X systems, as this is what plugins expect.
3009 2006-05-01 Timothy Hatcher <timothy@apple.com>
3013 <rdar://problem/4308243> 8F36 Regression: crash in malloc_consolidate if you use a .PAC file
3015 The original fix missed the oversized cell case. Added a test for "currentThreadIsMainThread ||
3016 imp->m_destructorIsThreadSafe" where we collect oversized cells.
3018 We don't have a way to test PAC files yet, so there's no test attached.
3020 * kjs/collector.cpp:
3021 (KJS::Collector::collect): test the thread when we collect oversized cells
3023 2006-05-01 Tim Omernick <timo@apple.com>
3027 <rdar://problem/4526114> REGRESSION (two days ago): LOG() just prints @ for NSObject substitutions
3029 * kxmlcore/Assertions.cpp:
3030 Changed sense of strstr("%@") check. I already made the same fix to the WebBrowser assertions.
3032 2006-04-28 Steve Falkenburg <sfalken@apple.com>
3036 Actually apply the change that was reviewed insted of checking it in with an #if 0 (oops).
3039 (main): Suppress C runtime alerts
3041 2006-04-28 Steve Falkenburg <sfalken@apple.com>
3045 Suppress error reporting dialog that blocks Javascript tests from completing.
3047 Real error is due to an overflow in the date/time handling functions that needs
3048 to be addressed, but this will prevent the hang running the Javascript tests
3049 on the build bot (along with the related changes).
3052 (main): Suppress C runtime alerts
3054 2006-04-27 Geoffrey Garen <ggaren@apple.com>
3058 - Minor fixups I discovered while working on the autogenerator.
3061 (findEntry): ASSERT that size is not 0, because otherwise we'll % by 0,
3062 compute a garbage address, and possibly crash.
3064 (cacheGlobalObject): Don't enumerate cached objects -- ideally, they
3065 would be hidden entirely.
3067 2006-04-21 Kevin M. Ollivier <kevino@theolliviers.com>
3071 - http://bugzilla.opendarwin.org/show_bug.cgi?id=8507
3072 Compilation fixes for building on gcc 4.0.2, and without precomp headers
3075 * kxmlcore/Assertions.cpp:
3076 * kxmlcore/FastMalloc.cpp:
3077 Added necessary headers to resolve compilation issues when not using
3078 precompiled headers.
3080 * kjs/value.h: Declare the JSCell class before friend declaration
3081 to resolve compilation issues with gcc 4.0.2.
3083 * kxmlcore/Platform.h: Set Unicode support to use ICU on platforms
3084 other than KDE (previously only defined for Win and Mac OS)
3086 2006-04-18 Eric Seidel <eseidel@apple.com>
3090 Fix "new Function()" to correctly use lexical scoping.
3091 Add ScopeChain::print() function for debugging.
3092 <rdar://problem/4067864> REGRESSION (125-407): JavaScript failure on PeopleSoft REN Server
3094 * kjs/function_object.cpp:
3095 (FunctionObjectImp::construct):
3096 * kjs/scope_chain.cpp:
3097 (KJS::ScopeChain::print):
3098 * kjs/scope_chain.h:
3100 2006-04-14 James G. Speth <speth@end.com>
3102 Reviewed by Timothy.
3104 Bug 8389: support for Cocoa bindings - binding an NSTreeController to the WebView's DOM
3105 http://bugzilla.opendarwin.org/show_bug.cgi?id=8389
3107 Adds a category to WebScriptObject with array accessors for KVC/KVO.
3109 If super valueForKey: fails it will call valueForUndefinedKey:, which is
3110 important because it causes the right behavior to happen with bindings using
3111 the "Raises for Not Applicable Keys" flag and the "Not Applicable Placeholder"
3113 * bindings/objc/WebScriptObject.mm:
3114 (-[WebScriptObject valueForKey:]):
3115 (-[WebScriptObject count]):
3116 (-[WebScriptObject objectAtIndex:]):
3117 (-[WebUndefined description]): return "undefined"
3119 2006-04-13 Geoffrey Garen <ggaren@apple.com>
3124 (KJS::InterpreterImp::initGlobalObject): Add the built-in object
3125 prototype to the end of the global object's prototype chain instead of
3126 just blowing away its existing prototype. We need to do this because
3127 the window object has a meaningful prototype now.
3129 2006-04-13 Maciej Stachowiak <mjs@apple.com>
3133 - fix testkjs to not show false-positive KJS::Node leaks in debug builds
3139 2006-04-11 Geoffrey Garen <ggaren@apple.com>
3143 Minor code cleanup -- passes all the JS tests.
3145 * kjs/object_object.cpp:
3146 (ObjectObjectImp::construct):
3147 (ObjectObjectImp::callAsFunction):
3149 2006-04-11 Darin Adler <darin@apple.com>
3151 - another attempt to fix Windows build -- Vector in Forward.h was not working
3153 * kxmlcore/Forward.h: Remove Vector.
3154 * kxmlcore/Vector.h: Add back default arguments, remove include of
3157 2006-04-11 Darin Adler <darin@apple.com>
3159 - try to fix Windows build -- HashForward.h was not working
3161 * kxmlcore/HashForward.h: Removed.
3163 * JavaScriptCore.xcodeproj/project.pbxproj: Remove HashForward.h.
3164 * kjs/collector.h: Remove use of HashForward.h.
3165 * kxmlcore/HashCountedSet.h: Remove include of HashForward.h, restore
3167 * kxmlcore/HashMap.h: Ditto.
3168 * kxmlcore/HashSet.h: Ditto.
3170 2006-04-11 David Harrison <harrison@apple.com>
3174 - fixed clean build, broken by Darin's check-in
3176 * kjs/date_object.cpp: Add needed include of lookup.h.
3177 * kjs/regexp_object.cpp: Move include of .lut.h file below other includes.
3179 2006-04-10 Darin Adler <darin@apple.com>
3181 Rubber-stamped by John Sullivan.
3183 - switched from a shell script to a makefile for generated files
3184 - removed lots of unneeded includes
3185 - added new Forward.h and HashForward.h headers that allow compiling with
3186 fewer unneeded templates
3188 * DerivedSources.make: Added.
3189 * generate-derived-sources: Removed.
3190 * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, changed to use
3191 DerivedSources.make.
3193 * kxmlcore/Forward.h: Added.
3194 * kxmlcore/HashForward.h: Added.
3196 * kxmlcore/HashCountedSet.h: Include HashForward for default args.
3197 * kxmlcore/HashMap.h: Ditto.
3198 * kxmlcore/HashSet.h: Ditto.
3202 Moved KJS_MAX_STACK into the .cpp file.
3204 * bindings/NP_jsobject.cpp:
3205 * bindings/c/c_instance.h:
3206 * bindings/jni/jni_class.h:
3207 * bindings/jni/jni_runtime.h:
3208 * bindings/jni/jni_utility.h:
3209 * bindings/objc/WebScriptObject.mm:
3210 * bindings/objc/WebScriptObjectPrivate.h:
3211 * bindings/objc/objc_class.h:
3212 * bindings/objc/objc_class.mm:
3213 * bindings/objc/objc_instance.h:
3214 * bindings/objc/objc_instance.mm:
3215 * bindings/objc/objc_runtime.mm:
3216 * bindings/objc/objc_utility.mm:
3217 * bindings/runtime.h:
3218 * bindings/runtime_array.cpp:
3219 * bindings/runtime_array.h:
3220 * bindings/runtime_method.cpp:
3221 * bindings/runtime_method.h:
3222 * bindings/runtime_object.cpp:
3223 * bindings/runtime_root.h:
3224 * kjs/JSImmediate.cpp:
3226 * kjs/array_object.cpp:
3227 * kjs/array_object.h:
3228 * kjs/bool_object.cpp:
3229 * kjs/bool_object.h:
3233 * kjs/error_object.h:
3234 * kjs/function_object.h:
3237 * kjs/math_object.cpp:
3238 * kjs/math_object.h:
3241 * kjs/number_object.cpp:
3242 * kjs/number_object.h:
3243 * kjs/object_object.cpp:
3244 * kjs/operations.cpp:
3245 * kjs/protected_reference.h:
3247 * kjs/reference_list.h:
3248 * kjs/regexp_object.h:
3249 * kjs/string_object.cpp:
3250 * kjs/string_object.h:
3254 * kxmlcore/HashTable.h:
3255 * kxmlcore/ListRefPtr.h:
3256 * kxmlcore/TCPageMap.h:
3257 * kxmlcore/Vector.h:
3258 Removed unneeded header includes.
3260 2006-04-09 Geoffrey Garen <ggaren@apple.com>
3264 - Fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=8284
3265 prevent unnecessary entries in the "nodes with extra refs" hash table
3267 This patch switches manually RefPtr exchange with use of
3268 RefPtr::release to ensure that a node's ref count never tops 1
3269 (in the normal case).
3272 (BlockNode::BlockNode):
3273 (CaseBlockNode::CaseBlockNode):
3275 (KJS::ArrayNode::ArrayNode):
3276 (KJS::ObjectLiteralNode::ObjectLiteralNode):
3277 (KJS::ArgumentsNode::ArgumentsNode):
3278 (KJS::VarStatementNode::VarStatementNode):
3279 (KJS::ForNode::ForNode):
3280 (KJS::CaseClauseNode::CaseClauseNode):
3281 (KJS::FuncExprNode::FuncExprNode):
3282 (KJS::FuncDeclNode::FuncDeclNode):
3284 2006-04-08 Alexey Proskuryakov <ap@nypop.com>
3288 One more attempt - use reinterpret_cast, rather than static_cast.
3290 2006-04-08 Alexey Proskuryakov <ap@nypop.com>
3294 An attempt to fix Win32 build - ICU uses wchar_t on Windows, so we need a type cast.
3296 * kxmlcore/unicode/icu/UnicodeIcu.h:
3297 (KXMLCore::Unicode::toLower):
3298 (KXMLCore::Unicode::toUpper):
3300 2006-04-08 Alexey Proskuryakov <ap@nypop.com>
3304 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8264
3305 toLowerCase and toUpperCase don't honor special mappings
3307 Test: fast/js/string-capitalization.html
3309 * JavaScriptCore.xcodeproj/project.pbxproj: Added KXMLCore::Unicode headers to the project.
3310 * icu/unicode/putil.h: Added (copied from WebCore).
3311 * icu/unicode/uiter.h: Ditto.
3312 * icu/unicode/ustring.h: Ditto.
3313 * kjs/string_object.cpp:
3314 (StringProtoFunc::callAsFunction): Use the new KXMLCore::Unicode::toUpper() and toLower().
3315 * kjs/ustring.cpp: Removed unused (and evil) UChar::toLower() and toUpper().
3316 * kjs/ustring.h: Ditto.
3318 * kxmlcore/unicode/Unicode.h: Corrected capitalization of the word Unicode.
3319 * kxmlcore/unicode/UnicodeCategory.h: Renamed include guard macro to match file name.
3321 * kxmlcore/unicode/icu/UnicodeIcu.h:
3322 (KXMLCore::Unicode::toLower): Work on strings, not individual characters. Use ICU root locale.
3323 (KXMLCore::Unicode::toUpper): Ditto.
3324 (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point.
3325 (KXMLCore::Unicode::isSeparatorSpace): Ditto.
3326 (KXMLCore::Unicode::category): Ditto.
3327 * kxmlcore/unicode/qt4/UnicodeQt4.h:
3328 (KXMLCore::Unicode::toLower): Work on strings, not individual characters.
3329 (KXMLCore::Unicode::toUpper): Ditto.
3330 (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point.
3331 (KXMLCore::Unicode::isSeparatorSpace): Ditto.
3332 (KXMLCore::Unicode::category): Ditto.
3334 * tests/mozilla/ecma/String/15.5.4.12-1.js: Corrected expected results.
3335 * tests/mozilla/ecma/String/15.5.4.12-5.js: Corrected expected results.
3337 2006-04-05 Darin Adler <darin@apple.com>
3339 - attempt to fix Windows build
3341 * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use (*it). instead of it->.
3342 * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto.
3344 2006-04-05 Darin Adler <darin@apple.com>
3346 - attempt to fix Windows build
3348 * os-win32/stdint.h: Add int8_t, uint8_t, int64_t.
3350 2006-04-05 Darin Adler <darin@apple.com>
3354 - fix memory leak introduced by the previous change
3356 * kxmlcore/HashTable.h: Specialize NeedsRef so that it correctly returns true when
3357 the value in question is a pair where one of the pair needs a ref and the other
3358 of the pair does not.
3360 2006-04-05 Darin Adler <darin@apple.com>
3364 - JavaScriptCore part of fix for http://bugzilla.opendarwin.org/show_bug.cgi?id=8049
3365 StringImpl hash traits deleted value creates an init routine for WebCore
3366 <rdar://problem/4442248> REGRESSION: WebCore has init routines (8049)
3368 Change HashMap and HashSet implementation so they fold various types together.
3369 This allows us to implement maps and sets that use RefPtr<WebCore::StringImpl>
3370 and WebCore::String in terms of the underlying raw pointer type, and hence use
3371 -1 for the deleted value.
3373 * kxmlcore/HashTraits.h: Added a new type to HashTraits, StorageTraits, which is a
3374 type to be used when storing a value that has the same layout as the type itself.
3375 This is used only for non-key cases. In the case of keys, the hash function must also
3376 be considered. Moved emptyValue out of GenericHashTraitsBase into GenericHashTraits.
3377 Added a new bool to HashTraits, needsRef, which indicates whether the type needs
3378 explicit reference counting. If the type itself has needsRef true, but the storage
3379 type has needsRef false, then the HashSet or HashMap has to handle the reference
3380 counting explicitly. Added hash trait specializations for all signed integer values
3381 that give -1 as the deleted value. Gave all integers StorageTraits of the canonical
3382 integer type of the same size so int and long will share code. Gave all pointers and
3383 RefPtrs StorageTraits of the appropriately sized integer type. Removed redundant
3384 TraitType and emptyValue definitions in the pointer specialization for HashTraits.
3385 Added PairBaseHashTraits, which doesn't try to set up needsDestruction and deletedValue.
3386 Useful for types where we don't want to force the existence of deletedValue, such as
3387 the type of a pair in a HashMap which is not the actual storage type. Removed an
3388 unneeded parameter from the DeletedValueAssigner template. Added HashKeyStorageTraits
3389 template, which determines what type can be used to store a given hash key type with
3390 a given hash function, and specialized it for pointers and RefPtr so that pointer
3391 hash tables share an underlying HashTable that uses IntHash.
3393 * kxmlcore/HashTable.h: Added HashTableConstIteratorAdapter, HashTableIteratorAdapter,
3394 NeedsRef, RefCountManagerBase, RefCountManager, HashTableRefCountManagerBase, and
3395 HashTableRefCountManager. All are used by both HashSet and HashMap to handle hash
3396 tables where the type stored is not the same as the real value type.
3398 * kxmlcore/HashFunctions.h: Added a new struct named IntTypes that finds an
3399 integer type given a sizeof value. Renamed pointerHash to intHash and made it
3400 use overloading and take integer parameters. Added an IntHash struct which is
3401 a hash function that works for integers. Changed PtrHash to call IntHash with
3402 an appropriately sized integer. Made IntHash the default hash function for
3403 many integer types. Made PtrHash the default hash function for RefPtr as well
3404 as for raw pointers.
3406 * kxmlcore/HashSet.h: Changed implementation to use a separate "storage type"
3407 derived from the new traits. The HashTable will use the storage type and all
3408 necessary translation and ref/deref is done at the HashSet level. Also reorganized
3409 the file so that the HashSet is at the top and has no inline implementation inside
3410 it so it's easy to read the interface to HashSet.
3412 * kxmlcore/HashMap.h: Changed implementation to use a separate "storage type"
3413 derived from the new traits. The HashTable will use the storage type and all
3414 necessary translation and ref/deref is done at the HashMap level. Also reorganized
3415 the file so that the HashMap is at the top and has no inline implementation inside
3416 it so it's easy to read the interface to HashMap.
3418 * kxmlcore/HashMapPtrSpec.h: Removed. Superceded by optimizations in HashMap itself.
3420 * JavaScriptCore.xcodeproj/project.pbxproj: Remove HashMapPtrSpec.h, resort files,
3421 and also remove some unnecessary build settings from the aggregate target that
3422 generates derived sources.
3423 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
3425 2006-04-04 Timothy Hatcher <timothy@apple.com>
3429 The Debug and Release frameworks are now built with install paths relative to the build products directory.
3430 This removes the need for other projects to build with -framework WebCore and -framework JavaScriptCore.
3432 * JavaScriptCore.xcodeproj/project.pbxproj:
3434 2006-04-04 Eric Seidel <eseidel@apple.com>
3439 Disable ASSERT redefinition warnings for now.
3441 * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:
3442 * kxmlcore/Assertions.h:
3444 2006-04-04 Bjrn Graf <bjoern.graf@gmail.com>
3446 Reviewed by ggaren & darin. Landed by eseidel.
3448 Integrate CURL version of gettimeofday
3449 http://bugzilla.opendarwin.org/show_bug.cgi?id=7399
3450 Disable crash report dialogs for testkjs.exe in Release mode
3451 http://bugzilla.opendarwin.org/show_bug.cgi?id=8113
3456 (StopWatch::getElapsedMS):
3460 2006-04-04 Eric Seidel <eseidel@apple.com>
3464 * kjs/number_object.cpp:
3465 (NumberProtoFunc::callAsFunction): remove trunc() to fix win32.
3467 2006-03-12 Maciej Stachowiak <mjs@apple.com>
3471 - fixed "toPrecision sometimes messes up the last digit on intel Macs"
3472 http://bugzilla.opendarwin.org/show_bug.cgi?id=7748
3474 * kjs/number_object.cpp:
3475 (intPow10): Compute integer powers of 10 using exponentiation by squaring.
3476 (NumberProtoFunc::callAsFunction): Use intPow10(n) in place of all pow(10.0, n),
3477 plus a bit of refactoring.
3479 2006-04-03 Darin Adler <darin@apple.com>
3481 - tweak config.h and Platform.h to try to get buildbot working
3482 (making some small changes at the same time)
3484 * kjs/config.h: Removed now-unneeded HAVE_ICU.
3485 * kxmlcore/Platform.h: Tweak how platform gets set up. Move all the
3486 USE stuff to the end.
3488 2006-04-03 George Staikos <staikos@opensource.apple.com>
3492 Fix Win32 build breakage from previous commit, remove unused forward.
3494 2006-04-03 George Staikos <staikos@opensource.apple.com>
3498 Implement a unicode abstraction layer to make JavaScriptCore much more
3499 easily ported to other platforms without having to take in libicu. Also
3500 makes the unicode related code easier to understand.
3502 2006-04-03 Timothy Hatcher <timothy@apple.com>
3506 Fixes <rdar://problem/4498338> JavaScriptCore fails to compile for ppc64
3507 Other 64 bit build fixes.
3509 * kjs/collector.cpp:
3510 (KJS::Collector::markOtherThreadConservatively): test for __DARWIN_UNIX03 and use __r1
3512 (Bigint::): cast PRIVATE_mem to unsigned to prevent warning
3513 * bindings/jni/jni_utility.cpp:
3514 (KJS::Bindings::getJavaVM): cast jniError to long to prevent format warning
3515 (KJS::Bindings::getJNIEnv): cast jniError to long to prevent format warning
3516 * bindings/runtime_root.cpp:
3517 (KJS::Bindings::addNativeReference): cast CFDictionaryGetValue to unsigned long to prevent warning
3518 (KJS::Bindings::removeNativeReference): cast CFDictionaryGetValue to unsigned long to prevent warning
3520 2006-03-31 Darin Adler <darin@apple.com>
3524 - <rdar://problem/4395622> API: WebScriptObject.h incorrectly reports that -isSelectorExcludedFromWebScript returns NO by default