Reviewed, tweaked and landed by ap
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 2006-08-24  Nikolas Zimmermann  <zimmermann@kde.org>
2
3         Reviewed, tweaked and landed by ap
4
5         http://bugzilla.opendarwin.org/show_bug.cgi?id=10467
6         WebKit should have Qt platform support (Part II)
7
8         * CMakeLists.txt: Adjust to Anders' build fixes.
9         * wtf/Platform.h: Fix define for the Qt platform (we don't use/need Cairo.)
10
11 2006-08-23  David Hyatt  <hyatt@apple.com>
12
13         Fix Platform.h to include #defines for graphics features.
14
15         Reviewed by darin
16
17         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
18         * wtf/Platform.h:
19
20 2006-08-23  Anders Carlsson  <acarlsson@apple.com>
21
22         Reviewed by Darin.
23
24         Make the bindings compile without CoreFoundation.
25         
26         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
27         * bindings/c/c_instance.cpp:
28         * bindings/c/c_utility.cpp:
29         (KJS::Bindings::convertUTF8ToUTF16):
30         * bindings/npapi.h:
31         * bindings/runtime.cpp:
32         (KJS::Bindings::Instance::createBindingForLanguageInstance):
33         (KJS::Bindings::Instance::createLanguageInstanceForValue):
34         * bindings/runtime_root.cpp:
35         * bindings/runtime_root.h:
36         * kjs/interpreter.cpp:
37         (KJS::Interpreter::createLanguageInstanceForValue):
38         * kjs/interpreter.h:
39
40 2006-08-22  Anders Carlsson  <acarlsson@apple.com>
41
42         Reviewed by Darin.
43
44         Move the npruntime code over to using HashMap and the runtime_root code over to using 
45         HashMap and HashCountedSet.
46         
47         * bindings/NP_jsobject.cpp:
48         * bindings/c/c_utility.cpp:
49         (KJS::Bindings::identifierFromNPIdentifier):
50         * bindings/c/c_utility.h:
51         * bindings/jni/jni_jsobject.cpp:
52         (JavaJSObject::invoke):
53         * bindings/npruntime.cpp:
54         (getStringIdentifierMap):
55         (getIntIdentifierMap):
56         (_NPN_GetStringIdentifier):
57         (_NPN_GetIntIdentifier):
58         * bindings/runtime_root.cpp:
59         (getReferencesByRootMap):
60         (getReferencesSet):
61         (KJS::Bindings::findReferenceSet):
62         (KJS::Bindings::rootForImp):
63         (KJS::Bindings::rootForInterpreter):
64         (KJS::Bindings::addNativeReference):
65         (KJS::Bindings::removeNativeReference):
66         (RootObject::removeAllNativeReferences):
67         * bindings/runtime_root.h:
68
69 2006-08-22  Anders Carlsson  <acarlsson@apple.com>
70
71         Reviewed by Geoff.
72         
73         Switch over the NPAPI and Java bindings to using HashMaps instead of dictionaries.
74         
75         * JavaScriptCore.xcodeproj/project.pbxproj:
76         * bindings/c/c_class.cpp:
77         (KJS::Bindings::CClass::CClass):
78         (KJS::Bindings::CClass::~CClass):
79         (KJS::Bindings::CClass::classForIsA):
80         (KJS::Bindings::CClass::methodsNamed):
81         (KJS::Bindings::CClass::fieldNamed):
82         * bindings/c/c_class.h:
83         * bindings/jni/jni_class.cpp:
84         (JavaClass::JavaClass):
85         (JavaClass::~JavaClass):
86         (JavaClass::methodsNamed):
87         (JavaClass::fieldNamed):
88         * bindings/jni/jni_class.h:
89         * bindings/objc/objc_class.h:
90         * bindings/objc/objc_class.mm:
91         (KJS::Bindings::deleteMethod):
92         (KJS::Bindings::deleteField):
93         (KJS::Bindings::):
94         (KJS::Bindings::ObjcClass::methodsNamed):
95         (KJS::Bindings::ObjcClass::fieldNamed):
96         * bindings/runtime.cpp:
97         * bindings/runtime.h:
98         * bindings/runtime_object.cpp:
99         (RuntimeObjectImp::fieldGetter):
100         (RuntimeObjectImp::getOwnPropertySlot):
101         (RuntimeObjectImp::put):
102         (RuntimeObjectImp::canPut):
103
104 2006-08-21  Vladimir Olexa  <vladimir.olexa@gmail.com>
105
106         Reviewed by Darin.
107
108         http://bugzilla.opendarwin.org/show_bug.cgi?id=6252
109         JavaScript 1.6 Array.lastIndexOf
110
111         Test: fast/js/array-lastIndexOf.html
112
113         * kjs/array_object.cpp:
114         (ArrayProtoFunc::callAsFunction): Added a LastIndexOf case.
115         * kjs/array_object.h:
116         (KJS::ArrayProtoFunc::): Added LastIndexOf to enum.
117         * tests/mozilla/expected.html: Two more tests now pass.
118
119 2006-08-20  Nikolas Zimmermann  <zimmermann@kde.org>
120
121         Reviewed by Maciej. Landed by rwlbuis.
122
123         Fixes parts of: http://bugzilla.opendarwin.org/show_bug.cgi?id=10463
124         WebKit should have Qt platform support
125
126         Removing obsolete QConstString/QString constructors in kjs code.
127
128         * kjs/identifier.h:
129         * kjs/ustring.h:
130
131 2006-08-17  Nikolas Zimmermann  <zimmermann@kde.org>
132
133         Reviewed by Maciej. Landed by rwlbuis.
134
135         Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10463
136         WTF Changes needed for Qt platform code.
137
138         * wtf/Platform.h:
139         * wtf/unicode/UnicodeDecomposition.h: Added.
140         (WTF::Unicode::):
141         * wtf/unicode/UnicodeDirection.h: Added.
142         (WTF::Unicode::):
143         * wtf/unicode/qt4/UnicodeQt4.cpp: Added.
144         (WTF::Unicode::direction):
145         (WTF::Unicode::category):
146         (WTF::Unicode::decomposition):
147         * wtf/unicode/qt4/UnicodeQt4.h:
148         (WTF::Unicode::toLower):
149         (WTF::Unicode::toUpper):
150         (WTF::Unicode::isPrintableChar):
151         (WTF::Unicode::isSpace):
152         (WTF::Unicode::isPunct):
153         (WTF::Unicode::isDigit):
154         (WTF::Unicode::mirroredChar):
155         (WTF::Unicode::compare):
156
157 2006-08-17  Nikolas Zimmermann  <zimmermann@kde.org>
158
159         Reviewed by Eric. Landed by rwlbuis.
160
161         Fixes: http://bugzilla.opendarwin.org/show_bug.cgi?id=10464
162         Offer a cmake build system for Qt platform.
163
164         * CMakeLists.txt: Added.
165         * pcre/CMakeLists.txt: Added.
166
167 2006-08-17  Anders Carlsson  <acarlsson@apple.com>
168
169         Reviewed by Maciej.
170
171         * bindings/npapi.h:
172         Fix ifdef.
173
174 2006-08-15  Steve Falkenburg  <sfalken@apple.com>
175
176         Reviewed by mjs.
177         
178         Build fix.
179
180         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
181         * wtf/Assertions.h:
182
183 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
184
185         Reviewed by Tim H.
186
187         Build fix:  DWARF and -gfull are incompatible with symbol separation.
188
189         * JavaScriptCore.xcodeproj/project.pbxproj:
190
191 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
192
193         Reviewed by Tim H.
194
195         http://bugzilla.opendarwin.org/show_bug.cgi?id=10394
196         Bug 10394: WebKit Release and Production configurations should enable dead code stripping
197
198         * JavaScriptCore.xcodeproj/project.pbxproj:
199
200 2006-08-15  Mark Rowe  <opendarwin.org@bdash.net.nz>
201
202         Reviewed by Tim H.
203
204         http://bugzilla.opendarwin.org/show_bug.cgi?id=10384
205         Bug 10384: Switch to DWARF for Release configuration
206
207         * JavaScriptCore.xcodeproj/project.pbxproj:
208
209 2006-08-13  Maks Orlovich  <maksim@kde.org>
210
211         Reviewed (and tweaked a little) by Maciej.
212         
213         - shrank the size of JSObject by 8 bytes and made the corresponding reduction to the cell size, resulting
214         in a 1.2% speed improvement on JS iBench (and probably overall memory savings).
215
216         This was done by removing _scope and _internalValue data members
217         from JSObject and moving them only to the subclasses that actually
218         make use of them.
219         
220         * kjs/object.cpp: 
221         (KJS::JSObject::mark): No need to mark scope or internal value here.
222         * kjs/object.h:
223         (KJS::JSObject::JSObject): Don't initialize them.
224         * kjs/JSWrapperObject.cpp: Added. New base class for object types that
225         wrap primitive values (Number, String, Boolean, Date).
226         (KJS::JSWrapperObject::mark): 
227         * kjs/JSWrapperObject.h: Added.
228         (KJS::JSWrapperObject::JSWrapperObject):
229         (KJS::JSWrapperObject::internalValue):
230         (KJS::JSWrapperObject::setInternalValue):
231         * kjs/array_object.cpp:
232         (ArrayPrototype::ArrayPrototype): Don't set useless internal value.
233         * kjs/bool_object.cpp:
234         (BooleanInstance::BooleanInstance): Inherit from JSWrapperObject.
235         (BooleanProtoFunc::callAsFunction): Fixed to account for fact that not all
236         JSObjects have an internal value.
237         (BooleanObjectImp::construct): ditto.
238         * kjs/bool_object.h:
239         * kjs/collector.cpp: Lowered cell size to 48.
240         (KJS::Collector::allocate): meaningless whitespace change
241         * kjs/date_object.cpp:
242         (KJS::DateInstance::DateInstance): Inherit from JSWrapperObject.
243         (KJS::DateProtoFunc::callAsFunction): adjusted for move of internalValue
244         (KJS::DateObjectImp::construct): ditto
245         * kjs/date_object.h:
246         * kjs/error_object.cpp:
247         (ErrorPrototype::ErrorPrototype): don't set internal value
248         * kjs/function.cpp: move _scope and related handling here
249         (KJS::FunctionImp::mark): mark scope
250         * kjs/function.h:
251         (KJS::FunctionImp::scope): moved here from JSObject
252         (KJS::FunctionImp::setScope): ditto
253         * kjs/number_object.cpp:
254         (NumberInstance::NumberInstance): inherit from JSWrapperObject
255         (NumberProtoFunc::callAsFunction): adjusted
256         (NumberObjectImp::construct): adjusted
257         * kjs/number_object.h: shring RegExp-related objects a little
258         * kjs/regexp_object.cpp:
259         (RegExpPrototype::RegExpPrototype): Adjust for size tweaks
260         (RegExpObjectImp::RegExpObjectImp): ditto
261         * kjs/regexp_object.h:
262         * kjs/string_object.cpp:
263         (StringInstance::StringInstance): inherit from JSWrapperObject
264         (StringProtoFunc::callAsFunction): adjusted
265         * kjs/string_object.h:
266         * JavaScriptCore.exp: Exported new methods as needed.
267         * JavaScriptCore.xcodeproj/project.pbxproj: Added new files to build.
268
269 2006-08-04  Brady Eidson  <beidson@apple.com>
270
271         Reviewed by Geoff's rubber stamp
272
273         Fix a build break on Intel hardware causes by adapting stricter
274         compiler warnings (-Wshorten-64-to-32)
275
276         * API/testapi.c:
277         (assertEqualsAsNumber): manually cast some doubles to floats
278         (main): ditto
279
280 2006-08-04  Sam Weinig  <sam.weinig@gmail.com>
281
282         Reviewed by Darin.
283
284         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10192
285           Make WebCore (and friends) compile with -Wshorten-64-to-32
286
287           * Adds -Wshorten-64-to-32 flag to Xcode project.
288           * Adds explicit casts where OK.
289
290         * API/JSNodeList.c:
291         (JSNodeList_item):
292         (JSNodeList_getProperty):
293         * JavaScriptCore.xcodeproj/project.pbxproj:
294
295 2006-08-04  Adam Roben  <aroben@apple.com>
296
297         Reviewed by Anders.
298
299         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Convert
300         spaces to tabs
301
302 2006-08-03  Sam Weinig  <sam.weinig@gmail.com>
303
304         Reviewed by Darin.
305
306         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10176
307           Make WebCore compile with -Wundef
308
309           * Adds -Wundef flag to Xcode project
310           * Converts #ifs to #ifdef and #ifndefs where needed.
311           * Added #define YYMAXDEPTH 10000 in kjs/grammar.y
312             to fix a warning from within Bison.
313
314         * JavaScriptCore.xcodeproj/project.pbxproj:
315         * bindings/jni/jni_jsobject.cpp:
316         (JavaJSObject::getSlot):
317         (JavaJSObject::setSlot):
318         * bindings/npapi.h:
319         * bindings/objc/objc_class.mm:
320         (KJS::Bindings::ObjcClass::methodsNamed):
321         (KJS::Bindings::ObjcClass::fieldNamed):
322         * bindings/objc/objc_instance.mm:
323         (ObjcInstance::invokeMethod):
324         * bindings/objc/objc_runtime.mm:
325         (ObjcMethod::getMethodSignature):
326         (ObjcField::name):
327         (ObjcField::type):
328         * kjs/grammar.y:
329         * kjs/identifier.h:
330
331 2006-08-03  Anders Carlsson  <acarlsson@apple.com>
332
333         Reviewed by John Sullivan.
334
335        * wtf/HashSet.h:
336         (WTF::::operator):
337         Return *this in operator=
338
339 2006-08-03  Adam Roben  <aroben@apple.com>
340
341         Reviewed by Anders.
342
343         - Fixed Windows build
344
345         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
346         * wtf/MathExtras.h: Implement inline versions of these functions
347         (nextafter):
348         (nextafterf):
349
350 2006-08-02  Adam Roben  <aroben@apple.com>
351
352         Reviewed by Darin.
353
354         - Fixed build
355
356         * kjs/date_object.cpp:
357         (KJS::formatTime):
358
359 2006-07-29  Darin Adler  <darin@apple.com>
360
361         - Removed tabs from these source files that still had them.
362           We don't use them; that way source files look fine in editors
363           that have tabs set to 8 spaces or to 4 spaces.
364         - Removed allow-tabs Subversion property from the files too.
365
366         * bindings/NP_jsobject.cpp:
367         * bindings/c/c_utility.cpp:
368         * bindings/jni/jni_runtime.cpp:
369         * bindings/jni/jni_utility.cpp:
370         * bindings/objc/objc_utility.mm:
371         * bindings/runtime.cpp:
372         * bindings/runtime_method.cpp:
373         * bindings/testbindings.cpp:
374         * bindings/testbindings.mm:
375         * kjs/date_object.cpp:
376         * kjs/function.cpp:
377         * kjs/list.cpp:
378         * kjs/nodes.cpp:
379         * kjs/nodes.h:
380         * kjs/string_object.cpp:
381         * kjs/ustring.cpp:
382
383 2006-07-29  Darin Adler  <darin@apple.com>
384
385         * tests/mozilla/expected.html: Update test results now that regress-185165.js
386         is succeeding. I suspect Anders fix for bug 4620655 is the reason.
387
388 2006-07-29  Sam Weinig  <sam.weinig@gmail.com>
389
390         Reviewed by Darin.
391
392         - patch for http://bugzilla.opendarwin.org/show_bug.cgi?id=10080
393           Adopt pedantic changes from the Unity project to improve 
394           cross-compiler compatibility
395
396           Changes include:
397           * Removing trailing semicolon from namespace braces.
398           * Removing trailing comma from last enum declaration.
399           * Updating to match style guidelines.
400           * Adding missing newline to the end of the file.
401           * Turning on gcc warning for missing newline at the end of a source file
402             (GCC_WARN_ABOUT_MISSING_NEWLINE in Xcode, -Wnewline in gcc).
403           * Alphabetical sorting of Xcode source list files. 
404           * Replace use of non-portable variable-size array with Vector.
405           * Use C-style comments instead of C++ comments in files that might
406             be included by either C or C++ files.
407
408         * API/JSCallbackConstructor.cpp:
409         (KJS::JSCallbackConstructor::construct):
410         * API/JSCallbackFunction.cpp:
411         (KJS::JSCallbackFunction::callAsFunction):
412         * API/JSCallbackObject.cpp:
413         (KJS::JSCallbackObject::construct):
414         (KJS::JSCallbackObject::callAsFunction):
415         * JavaScriptCore.xcodeproj/project.pbxproj:
416         * JavaScriptCorePrefix.h:
417         * bindings/jni/jni_class.cpp:
418         (JavaClass::fieldNamed):
419         * bindings/jni/jni_class.h:
420         * bindings/jni/jni_instance.cpp:
421         (JavaInstance::JavaInstance):
422         (JavaInstance::valueOf):
423         * bindings/jni/jni_objc.mm:
424         (KJS::Bindings::dispatchJNICall):
425         * bindings/jni/jni_runtime.cpp:
426         (JavaParameter::JavaParameter):
427         (JavaArray::JavaArray):
428         * bindings/jni/jni_runtime.h:
429         * bindings/jni/jni_utility.h:
430         * bindings/objc/objc_instance.h:
431         * bindings/runtime_array.h:
432         * kjs/collector.h:
433         * kjs/config.h:
434         * kjs/ustring.cpp:
435         * wtf/Platform.h:
436
437 2006-07-29  Mike Emmel  <mike.emmel@gmail.com>
438
439         Reviewed by Darin.
440
441         - fixes for Linux build
442
443         * JavaScriptCoreSources.bkl: Added new files to build, kjs/PropertyNameArray.cpp
444         and kjs/testkjs.cpp, and removed old files.
445
446 2006-07-24  Dan Waylonis  <waylonis@google.com>
447
448         Reviewed and tweaked a bit by Darin.
449
450         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9902
451           jsNull and NSNull not properly converted between JS and ObjC
452
453         * bindings/objc/objc_utility.mm: (KJS::Bindings::convertObjcValueToValue):
454         Added case for converting NSNull to jsNull.
455
456 2006-07-24  Rob Buis  <buis@kde.org>
457
458         Reviewed by Darin.
459
460         http://bugzilla.opendarwin.org/show_bug.cgi?id=4258
461         Date().toString() only includes GMT offset, not timezone string
462
463         Use the info in tm_zone to append timezone abbreviation
464         to Date().toString().
465
466         * kjs/date_object.cpp:
467         (KJS::formatTime):
468
469 2006-07-24  Rob Buis  <buis@kde.org>
470
471         Reviewed by Darin.
472
473         http://bugzilla.opendarwin.org/show_bug.cgi?id=5257
474         setYear() does not match FireFox/IE behavior
475
476         Make sure the right values end up in tm_year.
477
478         * kjs/date_object.cpp:
479         (KJS::formatTime):
480
481 2006-07-23  Mark Rowe  <opendarwin.org@bdash.net.nz>
482
483         Reviewed by Maciej.
484
485         Bug 9686: [Drosera] Need the ability to break into Drosera on Javascript exceptions
486         http://bugzilla.opendarwin.org/show_bug.cgi?id=9686
487
488         JavaScriptCore portion of the fix.
489
490         * JavaScriptCore.exp: Update symbol for change in argument type.
491         * kjs/debugger.cpp:
492         (Debugger::detach): Clear map of recent exceptions.
493         (Debugger::hasHandledException): Track the most recent exception
494         thrown by an interpreter.
495         (Debugger::exception): Change exception argument to a JSValue.
496         * kjs/debugger.h:
497         * kjs/nodes.cpp:
498         (Node::debugExceptionIfNeeded): Notify the debugger of an exception
499         if it hasn't seen it before.
500         (ThrowNode::execute): Notify the debugger that an exception is being thrown.
501         * kjs/nodes.h:
502
503     2006-07-23  Geoffrey Garen  <ggaren@apple.com>
504
505         Patch by Eric Albert, reviewed by Darin and me.
506         
507         - Fixed <rdar://problem/4645931> JavaScriptCore stack-scanning code 
508         crashes (Collector::markStackObjectsConservatively)
509         
510         * bindings/jni/jni_jsobject.cpp: On 64bit systems, jint is a long, not an
511         int.
512         (JavaJSObject::getSlot):
513         (JavaJSObject::setSlot):
514         * kjs/collector.cpp:
515         (KJS::Collector::markCurrentThreadConservatively): Use a pointer instead of
516         an int as 'dummy,' because on LP64 systems, an int is not pointer-aligned,
517         and we want to scan the stack for pointers.
518         * JavaScriptCore.xcodeproj/project.pbxproj: After a tense cease-fire, the 
519         XCode war has started up again!
520
521 === Safari-521.20 ===
522
523 2006-07-21  Geoffrey Garen  <ggaren@apple.com>
524
525         Reviewed by Darin.
526
527         <rdar://problem/4507265> REGRESSION: overlays don't work on HousingMaps.com (Google Maps-based site)
528
529         - Added support for strings that masquerade as undefined. Currently used
530         by WebCore to implement undetectable style.filter.
531         
532         The name is a little long, but it's only used in one line of code, so I
533         thought clarity should win over brevity.
534
535         * JavaScriptCore.exp:
536         * JavaScriptCore.xcodeproj/project.pbxproj:
537         * kjs/object.h:
538         * kjs/string_object.h:
539         (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined):
540         (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined):
541         (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean):
542
543 === Safari-521.19 ===
544
545 2006-07-20  Steve Falkenburg  <sfalken@apple.com>
546
547         Fix the build
548
549         * kjs/function.cpp:
550         (KJS::escapeStringForPrettyPrinting):
551
552 2006-07-19  Anders Carlsson  <acarlsson@apple.com>
553
554         Reviewed by Darin.
555
556         <rdar://problem/4620655> REGRESSION(10.4.7-10.5): preview button for a blogger.com post doesn't work
557         
558         * kjs/nodes2string.cpp:
559         (StringNode::streamTo):
560         Return the escaped string.
561         
562         (RegExpNode::streamTo):
563         Use the correct syntax.
564         
565         * kjs/function.cpp:
566         (KJS::escapeStringForPrettyPrinting):
567         * kjs/function.h:
568         Add escape function which escapes a string for pretty-printing so it can be parsed again.
569         
570         * wtf/unicode/icu/UnicodeIcu.h:
571         (WTF::Unicode::isPrintableChar):
572         New function.
573
574 2006-07-18  Maciej Stachowiak  <mjs@apple.com>
575
576         Reviewed by Adele Peterson.
577         
578         <rdar://problem/4589530> REGRESSION: null character in JS string causes parse error (works in Tiger and in other browsers)
579
580         * kjs/lexer.cpp:
581         (Lexer::shift):
582         (Lexer::lex):
583         (Lexer::record16):
584         (Lexer::scanRegExp):
585         * kjs/lexer.h:
586
587 2006-07-18  Tim Omernick  <timo@apple.com>
588
589         Reviewed by Tim Hatcher.
590
591         Removed a misleading comment; we recently added support for the NPNVPluginElementNPObject
592         variable.
593
594         * bindings/npapi.h:
595
596 === Safari-521.18 ===
597
598 2006-07-18  Timothy Hatcher  <timothy@apple.com>
599
600         Made the following headers public:
601
602         * JavaScriptCore.h
603         * JSBase.h
604         * JSContextRef.h
605         * JSObjectRef.h
606         * JSStringRef.h
607         * JSValueRef.h
608
609         * JavaScriptCore.xcodeproj/project.pbxproj:
610
611 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
612
613         Reviewed by Maciej.
614         
615         - Added automatic prototype creation for classes.
616         
617         A class stores a weak reference to a prototype, which is cleared when
618         the prototype is garbage collected, to avoid a reference cycle.
619         
620         We now have an attributes field in JSClassDefinition, that currently is
621         used only to override automatic prototype creation when you want to manage your
622         own prototypes, but can be extended in the future for other nefarious purposes.
623         
624         Similarly, we have JSObjectMake and JSObjectMakeWithPrototype, the latter
625         allowing you to manage your own prototypes.
626         
627         JSObjectMakeConstructor is more interesting now, able to make a constructor
628         on your behalf if you just give it a class.
629         
630         - Removed bogus old code from minidom.js.
631         
632         - Tweaked the headerdocs.
633         
634         - Added more GC testing, which caught some leaks, and tested more funny 
635         edge cases in lookup, which caught a lookup bug. Removed some testing 
636         we used to do with MyObject because it was redundant with the new, cool 
637         stuff.
638         
639         While fixing the lookup bug I retracted this change:
640         
641             "If a static setProperty callback returns 'false', to indicate that the
642             property was not set, we no longer forward the set request up the class
643             chain, because that's almost certainly not what the programmer expected."
644
645         Returning false when setting a static property is a little silly, but you can see
646         it being useful when shadowing a base class's static properties, and, regardless
647         of usefullness, this is the defined behavior of the setProperty callback.
648         
649         - Plus a little ASCII art, for the kids.
650
651 2006-07-17  Timothy Hatcher  <timothy@apple.com>
652
653         Reviewed by Maciej.
654
655         <rdar://problem/4634874> WebScriptObject and WebUndefined are no longer defined by WebKit
656
657         Moves WebScriptObject and WebUndefined up to WebCore.
658         This change does create an upwards-dependancy on WebScriptObject existing
659         in the loaded process, but this code path in JavaScriptCore does not get used
660         unless it is through WebKit/WebCore. Moving all of the binding code out of
661         JavaScriptCore might make sense in the future.
662
663         * JavaScriptCore.exp:
664         * JavaScriptCore.xcodeproj/project.pbxproj:
665         * bindings/objc/WebScriptObject.h: Replaced.
666         * bindings/objc/WebScriptObject.mm: Removed.
667         * bindings/objc/WebScriptObjectPrivate.h: Removed.
668         * bindings/objc/objc_class.h:
669         * bindings/objc/objc_instance.h:
670         * bindings/objc/objc_instance.mm:
671         (ObjcInstance::~ObjcInstance):
672         * bindings/objc/objc_runtime.h:
673         * bindings/objc/objc_runtime.mm:
674         (convertValueToObjcObject):
675         * bindings/objc/objc_utility.mm:
676         (KJS::Bindings::convertValueToObjcValue):
677         (KJS::Bindings::convertObjcValueToValue):
678         (KJS::Bindings::createObjcInstanceForValue):
679
680 2006-07-17  Darin Adler  <darin@apple.com>
681
682         * API/JSBase.h: Fix comment formatting where things used to be lined up but
683         are now ragged. Got rid of spaces that attempted to line things up.
684         * API/JSObjectRef.h: Ditto. Also add missing periods for a couple of comments.
685
686 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
687
688         Reviewed by Maciej.
689         
690         - Removed the exception parameter from the initialize callback and, by extension,
691         JSObjectMake. We have never had a need for exceptions when iniitializing,
692         so the parameter seemed likely to "get in the way." 
693         
694         Also, an exception in JavaScript is thrown in response to input -- 
695         "invalid URL", "index not a number", etc., so it's the job of the 
696         constructor function, not the initialize method, to throw.
697         
698         If initialize *really* wants to throw, it can communicate the throw to
699         the constructor through the constructed object's private data (e.g., set
700         it to NULL, signaling to the consntructor that initialization failed.)
701         
702         - Added JSObjectMakeWithData, which enables a constructor to set private
703         data on an object *before* it has been initialized. That way, the initialize
704         methods can properly operate on the data. 
705
706         * API/JSNode.c: Moved ref into the initialize method, for better encapsulation,
707         now that it's possible.
708         * API/JSNodeList.c: ditto
709         * API/minidom.c:
710         (main): Do more aggressive garbage collection to test ref/deref and 
711         initialize/finalize.
712         * API/minidom.js: store childNodes in a temporary so it doesn't get re-created
713         like a thousand times. This makes debugging ref/deref easier
714
715 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
716
717         Reviewed by Maciej.
718         
719         - Changed the initialize callback to run from least derived class (parent
720         class) to most derived class. This enables C++ style initialization,
721         and derived class overriding of member data.
722         
723         - Added excpetion propopgation to JSObjectMake, to support initialize
724         exceptions, and generally round out our policy of making function
725         signatures as long as possible.
726
727         * API/JSCallbackObject.h: Use ExecState instead of ContextRef, cuz we're
728         in C++ land now.
729
730 2006-07-17  Geoffrey Garen  <ggaren@apple.com>
731
732         Reviewed by Maciej.
733         
734         - Changed JSObjectMakeConstructor to JSObjectMakeConstructorWithCallback,
735         to match JSObjectMakeFunctionWithCallback.
736         
737         - Added prototype parameter, so the generated constructor
738         automatically works with hasInstance / instanceof
739         
740         - Moved hasInstance implementation from InternalFunctionImp to JSObject
741         so that subclasses can inherit it without inheriting function-related baggage.
742         More refactoring here would be good, but this seems like a good short-term
743         solution.
744
745         (KJS::JSCallbackFunction::implementsHasInstance): override and return false,
746         because callback functions aren't constructors.
747
748 2006-07-17  Maciej Stachowiak  <mjs@apple.com>
749
750         Reviewed by Geoff.
751         
752         - add a JSContextRef parameter to all JSValueRef, JSObjectRef, and JSContextRef operations;
753         except JSObject{Get,Set}PrivateData which can be assumed to be simple pure accessors.
754         
755         Also renamed the parameter "context" to "ctx" because it makes the code read better with this pervasive
756         but usually uninteresting parameter.
757
758         * API/JSBase.cpp:
759         (JSEvaluateScript):
760         (JSCheckScriptSyntax):
761         (JSGarbageCollect):
762         * API/JSBase.h:
763         * API/JSCallbackObject.cpp:
764         (KJS::JSCallbackObject::JSCallbackObject):
765         (KJS::JSCallbackObject::init):
766         (KJS::JSCallbackObject::getOwnPropertySlot):
767         (KJS::JSCallbackObject::put):
768         (KJS::JSCallbackObject::deleteProperty):
769         (KJS::JSCallbackObject::toNumber):
770         (KJS::JSCallbackObject::toString):
771         * API/JSContextRef.cpp:
772         (JSGlobalContextCreate):
773         (JSGlobalContextRetain):
774         (JSGlobalContextRelease):
775         (JSContextGetGlobalObject):
776         * API/JSContextRef.h:
777         * API/JSNode.c:
778         (JSNodePrototype_appendChild):
779         (JSNodePrototype_removeChild):
780         (JSNodePrototype_replaceChild):
781         (JSNode_getNodeType):
782         (JSNode_getFirstChild):
783         (JSNode_prototype):
784         * API/JSNodeList.c:
785         (JSNodeListPrototype_item):
786         (JSNodeList_length):
787         (JSNodeList_getProperty):
788         (JSNodeList_prototype):
789         * API/JSObjectRef.cpp:
790         (JSObjectMake):
791         (JSObjectMakeFunctionWithCallback):
792         (JSObjectMakeConstructor):
793         (JSObjectMakeFunction):
794         (JSObjectGetPrototype):
795         (JSObjectSetPrototype):
796         (JSObjectHasProperty):
797         (JSObjectGetProperty):
798         (JSObjectSetProperty):
799         (JSObjectGetPropertyAtIndex):
800         (JSObjectSetPropertyAtIndex):
801         (JSObjectDeleteProperty):
802         (JSObjectIsFunction):
803         (JSObjectCallAsFunction):
804         (JSObjectIsConstructor):
805         (JSObjectCallAsConstructor):
806         (JSObjectCopyPropertyNames):
807         * API/JSObjectRef.h:
808         * API/JSStringRef.cpp:
809         * API/JSValueRef.cpp:
810         (JSValueGetType):
811         (JSValueIsUndefined):
812         (JSValueIsNull):
813         (JSValueIsBoolean):
814         (JSValueIsNumber):
815         (JSValueIsString):
816         (JSValueIsObject):
817         (JSValueIsObjectOfClass):
818         (JSValueIsEqual):
819         (JSValueIsStrictEqual):
820         (JSValueIsInstanceOfConstructor):
821         (JSValueMakeUndefined):
822         (JSValueMakeNull):
823         (JSValueMakeBoolean):
824         (JSValueMakeNumber):
825         (JSValueMakeString):
826         (JSValueToBoolean):
827         (JSValueToNumber):
828         (JSValueToStringCopy):
829         (JSValueToObject):
830         (JSValueProtect):
831         (JSValueUnprotect):
832         * API/JSValueRef.h:
833         * API/minidom.c:
834         (print):
835         * API/testapi.c:
836         (MyObject_getProperty):
837         (MyObject_deleteProperty):
838         (MyObject_callAsFunction):
839         (MyObject_callAsConstructor):
840         (MyObject_convertToType):
841         (print_callAsFunction):
842         (main):
843
844 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
845
846         Approved by Maciej, RS by Beth.
847         
848         JSObjectMakeFunction -> JSObjectMakeFunctionWithCallback
849         JSObjectMakeFunctionWithBody -> JSObjectMakeFunction
850         
851         because the latter is more common, and more fundamental, than the former.
852
853         * API/APICast.h:
854         (toJS):
855         * API/JSBase.h:
856         * API/JSCallbackObject.cpp:
857         (KJS::JSCallbackObject::getOwnPropertySlot):
858         (KJS::JSCallbackObject::put):
859         (KJS::JSCallbackObject::deleteProperty):
860         (KJS::JSCallbackObject::getPropertyNames):
861         (KJS::JSCallbackObject::staticValueGetter):
862         (KJS::JSCallbackObject::staticFunctionGetter):
863         * API/JSClassRef.cpp:
864         (OpaqueJSClass::OpaqueJSClass):
865         (OpaqueJSClass::~OpaqueJSClass):
866         * API/JSClassRef.h:
867         * API/JSObjectRef.cpp:
868         (JSClassCreate):
869         (JSObjectMakeFunctionWithCallback):
870         (JSObjectMakeFunction):
871         (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
872         (JSObjectCopyPropertyNames):
873         * API/JSObjectRef.h:
874         * API/minidom.c:
875         (main):
876         * API/testapi.c:
877         (main):
878         * ChangeLog:
879         * JavaScriptCore.exp:
880
881 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
882
883         Laughed at by Beth.
884         
885         Replace __JS with OpaqueJS because the former, while used by CF, is
886         a prefix that's triply-reserved by the compiler. (_* is reserved in global 
887         names, _[A-Z] is reserved in all names, and __ is reserved in all names 
888         in C++.)
889         
890         Opaque is an alternative used by other Mac OS X framewokrs.
891
892         * API/APICast.h:
893         (toJS):
894         * API/JSBase.h:
895         * API/JSCallbackObject.cpp:
896         (KJS::JSCallbackObject::getOwnPropertySlot):
897         (KJS::JSCallbackObject::put):
898         (KJS::JSCallbackObject::deleteProperty):
899         (KJS::JSCallbackObject::getPropertyNames):
900         (KJS::JSCallbackObject::staticValueGetter):
901         (KJS::JSCallbackObject::staticFunctionGetter):
902         * API/JSClassRef.cpp:
903         (OpaqueJSClass::OpaqueJSClass):
904         (OpaqueJSClass::~OpaqueJSClass):
905         * API/JSClassRef.h:
906         * API/JSObjectRef.cpp:
907         (JSClassCreate):
908         (OpaqueJSPropertyNameArray::OpaqueJSPropertyNameArray):
909         (JSObjectCopyPropertyNames):
910
911 2006-07-16  Darin Adler  <darin@apple.com>
912
913         - try to fix Windows build
914
915         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
916         Added some recently added files, removed some recently removed.
917
918 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
919
920         Reviewed by Maciej.
921         
922         - Change getProperty* to return undefined, rather than NULL, for missing
923         properties, since that's what the spec says. Also added exception out
924         parameters to the *Index functions, because they can call through to the
925         regular functions, which can throw for custom objects.
926
927         * API/JSObjectRef.cpp:
928         (JSObjectGetProperty):
929         (JSObjectGetPropertyAtIndex):
930         (JSObjectSetPropertyAtIndex):
931         * API/JSObjectRef.h:
932         * API/testapi.c:
933         (main):
934
935 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
936
937         Reviewed by Maciej.
938         
939         - Properly document and handle NULL callbacks for static properties. We
940         throw an exception in any case other than a ReadOnly property with a NULL
941         setProperty callback, because a NULL callback almost certainly indicates 
942         a programming error. Also throw an exception if hasProperty returns true
943         for a property that getProperty can't get.
944         
945         - If a static setProperty callback returns 'false', to indicate that the
946         property was not set, we no longer forward the set request up the class
947         chain, because that's almost certainly not what the programmer expected.
948
949         * API/JSCallbackObject.cpp:
950         (KJS::JSCallbackObject::getOwnPropertySlot):
951         (KJS::JSCallbackObject::put):
952         (KJS::JSCallbackObject::staticValueGetter):
953         (KJS::JSCallbackObject::staticFunctionGetter):
954         (KJS::JSCallbackObject::callbackGetter):
955         * API/JSObjectRef.h:
956         * API/minidom.js:
957         * API/testapi.c:
958         (MyObject_hasProperty):
959         * API/testapi.js:
960
961 2006-07-16  Geoffrey Garen  <ggaren@apple.com>
962
963         Reviewed by Maciej.
964         
965         - Added names to functions.
966         
967         - Removed GetPrivate/SetPrivate from callbackFunctions and callbackConstructors.
968         The private data idiom is that a JS object stores its native implementation
969         as private data. For functions and constructors, the native implementation is nothing
970         more than the callback they already store, so supporting private data, too,
971         confuses the idiom. If you *really* want, you can still create a custom 
972         function with private data.
973
974         * API/JSCallbackConstructor.cpp:
975         * API/JSCallbackConstructor.h:
976         * API/JSCallbackFunction.cpp:
977         (KJS::JSCallbackFunction::JSCallbackFunction):
978         * API/JSCallbackFunction.h:
979         * API/JSCallbackObject.cpp:
980         (KJS::JSCallbackObject::staticFunctionGetter):
981         * API/JSObjectRef.cpp:
982         (JSObjectMakeFunction):
983         (JSObjectMakeFunctionWithBody):
984         (JSObjectGetPrivate):
985         (JSObjectSetPrivate):
986         * API/JSObjectRef.h:
987         * API/minidom.c:
988         (main):
989         * API/testapi.c:
990         (main):
991
992 2006-07-15  Maciej Stachowiak  <mjs@apple.com>
993
994         Reviewed by Darin.
995         
996         - switch property lists to be vector+set of Identifiers instead of list of References
997         
998         This has the following benefits:
999         
1000         - no duplicates in property lists
1001         - simplifies API calls
1002         - probably more efficient, since linked list is gone
1003         - entirely removed Reference, ReferenceList and ProtectedReference types from the API
1004
1005         * kjs/PropertyNameArray.cpp: Added.
1006         (KJS::PropertyNameArray::add): Check set, if not already there, add to
1007         vector.
1008         * kjs/PropertyNameArray.h: Added.
1009         (KJS::PropertyNameArray::PropertyNameArray): Newly added type, combines
1010         a set and a vector to make a unique but ordered list of identifiers.
1011         (KJS::PropertyNameArray::begin): ditto
1012         (KJS::PropertyNameArray::end): ditto
1013         (KJS::PropertyNameArray::size): ditto
1014         (KJS::PropertyNameArray::operator[]): ditto
1015         * kjs/array_instance.h:
1016         * kjs/array_object.cpp:
1017         (ArrayInstance::getPropertyNames): renamed from getPropertyList, updated
1018         for PropertyNameArray
1019         (ArrayInstance::setLength): updated for PropertyNameArray
1020         (ArrayInstance::pushUndefinedObjectsToEnd): ditto
1021         * kjs/nodes.cpp:
1022         (ForInNode::execute): updated for PropertyNameArray
1023         * kjs/nodes.h:
1024         * kjs/object.cpp:
1025         (KJS::JSObject::getPropertyNames): renamed from getPropertyList, updated
1026         for PropertyNameArray
1027         * kjs/object.h:
1028         * kjs/property_map.cpp:
1029         (KJS::PropertyMap::getEnumerablePropertyNames): updated for PropertyNameArray
1030         (KJS::PropertyMap::getSparseArrayPropertyNames): ditto
1031         * kjs/property_map.h:
1032         * kjs/protected_reference.h: Removed.
1033         * kjs/reference.cpp: Removed.
1034         * kjs/reference.h: Removed.
1035         * kjs/reference_list.cpp: Removed.
1036         * kjs/reference_list.h: Removed.
1037         * kjs/scope_chain.cpp:
1038         (KJS::ScopeChain::print): Use PropertyNamesArray instead of ReferenceList.
1039         * kjs/string_object.cpp:
1040         (StringInstance::getPropertyNames): Updated for new approach.
1041         * kjs/string_object.h:
1042         * kjs/ustring.h:
1043         * API/APICast.h:
1044         (toJS): Added overload for PropertyNameAccumulatorRef / PropertyNameArray*
1045         (toRef): ditto
1046         * API/JSBase.h:
1047         * API/JSCallbackObject.cpp:
1048         (KJS::JSCallbackObject::getPropertyNames): Fixed for new API.
1049         * API/JSCallbackObject.h:
1050         * API/JSObjectRef.cpp:
1051         (__JSPropertyNameArray::__JSPropertyNameArray): Type used for a publicly vended
1052         JSPropertyNameArrayRef.
1053         (JSObjectCopyPropertyNames): New API call - renamed / refactored from 
1054         JSObjectCreatePropertyList
1055         (JSPropertyNameArrayRetain): new retain call for JSPropertyNameArray.
1056         (JSPropertyNameArrayRelease): new release call for - " -.
1057         (JSPropertyNameArrayGetCount): Instead of having to use a stateful enumerator you
1058         can now get the count and items in any order.
1059         (JSPropertyNameArrayGetNameAtIndex): See above.
1060         (JSPropertyNameAccumulatorAddName): What you add properties to is now an opaque 
1061         accumulator object.
1062         * API/JSObjectRef.h: Prototyped new functions, removed old ones
1063         * JavaScriptCore.exp: Updated exported symbols.
1064         * JavaScriptCore.xcodeproj/project.pbxproj: Added new files, removed old.
1065         * API/testapi.c:
1066         (MyObject_getPropertyNames): Renamed / fixed callback to fit new paradigm.
1067         (main): Updated for new API.
1068
1069 2006-07-15  Darin Adler  <darin@apple.com>
1070
1071         - oops, missed a few more arrays that had to be const
1072
1073         * API/JSNode.c:
1074         (JSNodePrototype_appendChild): Added const.
1075         (JSNodePrototype_removeChild): Ditto.
1076         (JSNodePrototype_replaceChild): Ditto.
1077         (JSNode_construct): Ditto.
1078         * API/JSNodeList.c:
1079         (JSNodeListPrototype_item): Ditto.
1080         * API/JSObjectRef.cpp:
1081         (JSObjectMakeFunctionWithBody): Ditto.
1082         (JSObjectCallAsFunction): Ditto.
1083         (JSObjectCallAsConstructor): Ditto.
1084         * API/minidom.c:
1085         (print): Ditto.
1086         * API/testapi.c:
1087         (MyObject_callAsFunction): Ditto.
1088         (MyObject_callAsConstructor): Ditto.
1089         (print_callAsFunction): Ditto.
1090         (myConstructor_callAsConstructor): Ditto.
1091
1092 2006-07-15  Darin Adler  <darin@apple.com>
1093
1094         Reviewed by Maciej.
1095
1096         * API/JSNode.h: Made an array parameter const.
1097         * API/JSObjectRef.h: Made array parameters const. Fixed a comment.
1098
1099 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
1100
1101         Reviewed by Maciej.
1102         
1103         - JSObjectMakeFunctionWithBody includes a function name and named parameters now.
1104
1105         * API/JSObjectRef.cpp:
1106         (JSObjectMakeFunctionWithBody):
1107         * API/JSObjectRef.h:
1108         * API/testapi.c:
1109         (assertEqualsAsUTF8String): More informative failure reporting.
1110         (main): Test more function cases.
1111
1112 2006-07-15  Geoffrey Garen  <ggaren@apple.com>
1113
1114         Reviewed by Maciej.
1115
1116         - Moved the arguments passed to JSClassCreate into a single structure,
1117         called JSClassDefinition. This will enable easier structure 
1118         migration/versioning in the future, if necessary.
1119         
1120         - Added support for class names.
1121         
1122         - kJSClassDefinitionNull replaces kJSObjectCallbacksNone.
1123         
1124         - JSClass is becoming a fairly complex struct, so I migrated all of its
1125         implementation other than reference counting to the sruct.
1126         
1127         - Also moved JSClass* functions in the API to JSObjectRef.cpp, since they're
1128         declared in JSObjectRef.h
1129         
1130         - Also added some more informative explanation to the class structure doc.
1131         
1132 2006-07-15  Darin Adler  <darin@apple.com>
1133
1134         Reviewed by Geoff.
1135
1136         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8395
1137           <rdar://problem/4613467>
1138           REGRESSION: RegEx seems broken for hex escaped non breaking space
1139
1140         Test: fast/js/regexp-extended-characters-more.html
1141
1142         * pcre/pcre_exec.c:
1143         (match): Got rid of utf16Length local variable to guarantee there's no
1144         extra stack usage in recursive calls. Fixed two places in the PCRE_UTF16
1145         code that were using the length variable, which is the UTF-8 length of
1146         a character in the pattern, to move in the UTF-16 subject string. Instead
1147         they hardcode lengths of 1 and 2 since the code already handles BMP
1148         characters and surrogate pairs separately. Also fixed some DPRINTF so
1149         I could compile with DEBUG on.
1150         (pcre_exec): Changed a place that was checking for multibyte characters
1151         in the subject string to use ISMIDCHAR. Instead it was using hardcoded
1152         logic that was right for UTF-8 but wrong for UTF-16.
1153
1154         * pcre/pcre_compile.c: (pcre_compile2): Fixed a DPRINTF so I could compile
1155         with DEBUG on.
1156
1157 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
1158
1159         RS by Maciej.
1160         
1161         Global replace in the API of argc/argv with argumentCount/arguments.
1162
1163 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
1164
1165         Reviewed by Maciej.
1166         
1167         - Finalized exception handling in the API.
1168         
1169         setProperty can throw because it throws for built-in arrays. getProperty
1170         and deleteProperty can throw because setProperty can throw and we want
1171         to be consistent, and also because they seem like "actions." callAsFunction,
1172         callAsConstructor, and hasInstance can throw, because they caan throw for
1173         all built-ins.
1174         
1175         toBoolean can't throw because it's defined that way in the spec.
1176         
1177         - Documented that toBoolean and toObject can't be overridden by custom 
1178         objects because they're defined that way in the spec.
1179
1180 === Safari-521.17 ===
1181
1182 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
1183
1184         Reviewed by Maciej.
1185         
1186         - Implemented ref-counting of JSContexts by splitting into two datatypes:
1187         JSGlobalContext, which you can create/retain/release, and JSContext, which
1188         you can't.
1189         
1190         Internally, you retain a JSGlobalContext/ExecState by retaining its
1191         interpreter, which, in the case of a global ExecState, owns it.
1192         
1193         - Also made ~Interpreter() protected to catch places where Interpreter
1194         is manually deleted. (Can't make it private because some crazy fool
1195         decided it would be a good idea to subclass Interpreter in other frameworks.
1196         I pity da fool.)
1197
1198         * API/APICast.h: 
1199         (toJS): Added cast for new JSGlobalContext
1200         * API/JSStringRef.h: Changed vague "you must" language to more specific
1201         (but, ultimately, equally vague) "behavior is undefined if you don't" 
1202         language.
1203         (KJS::Interpreter::Interpreter): Factored more common initialization into
1204         init()
1205         * kjs/interpreter.h:
1206         (KJS::Interpreter::ref): new
1207         (KJS::Interpreter::deref): new
1208         (KJS::Interpreter::refCount): new
1209         * kjs/testkjs.cpp: 
1210         (doIt): Ref-count the interpreter.
1211
1212 2006-07-14  Maciej Stachowiak  <mjs@apple.com>
1213
1214         Reviewed by Geoff.
1215         
1216         - removed bool return value from JSObjectSetProperty, since it is inefficient and
1217         also doesn't work quite right
1218         - added JSObjectGetPropertyAtIndex and JSObjectSetPropertyAtIndex
1219
1220         * API/JSObjectRef.cpp:
1221         (JSObjectSetProperty): Removed return value and canPut stuff.
1222         (JSObjectGetPropertyAtIndex): Added.
1223         (JSObjectSetPropertyAtIndex): Added.
1224         * API/JSObjectRef.h: Prototyped and documented new functions.
1225
1226 2006-07-14  Geoffrey Garen  <ggaren@apple.com>
1227
1228         Reviewed by Beth.
1229         
1230         Moved JSCheckScriptSyntax, JSEvaluateScript, and JSGarbageCollect into
1231         JSBase.h/.cpp. They don't belong in the value-specific or context-specific 
1232         files because they're not part of the value or context implementations.
1233
1234         * API/JSBase.h:
1235         * API/JSContextRef.cpp:
1236         (JSContextGetGlobalObject):
1237         * API/JSContextRef.h:
1238         * API/JSValueRef.cpp:
1239         (JSValueUnprotect):
1240         * API/JSValueRef.h:
1241         * JavaScriptCore.xcodeproj/project.pbxproj:
1242
1243 2006-07-13  Timothy Hatcher  <timothy@apple.com>
1244
1245         Reviewed by Maciej.
1246
1247         Moved JavaScriptCore to be a public framework.
1248
1249         * JavaScriptCore.xcodeproj/project.pbxproj:
1250
1251 2006-07-13  Mark Rowe  <opendarwin.org@bdash.net.nz>
1252
1253         Reviewed by Geoffrey.
1254
1255         http://bugzilla.opendarwin.org/show_bug.cgi?id=9742
1256         Bug 9742: REGRESSION: WebKit hangs when loading <http://www.vtbook.com>
1257
1258         * kjs/value.h:
1259         (KJS::JSValue::getUInt32): Only types tagged as numeric can be converted to UInt32.
1260
1261 2006-07-13  Geoffrey Garen  <ggaren@apple.com>
1262
1263         Pleasing to Maciej.
1264         
1265         - Renamed JSEvaluate -> JSEvaluateScript, JSCheckSyntax -> JSCheckScriptSyntax
1266         - Added exception out parameters to JSValueTo* and JSValueIsEqual because
1267         they can throw
1268         - Removed JSObjectGetDescription because it's useless and vague, and 
1269         JSValueToString/JSValueIsObjectOfClass do a better job, anyway
1270         - Clarified comments about "IsFunction/Constructor" to indicate that they
1271         are true of all functions/constructors, not just those created by JSObjectMake*
1272
1273 2006-07-12  Geoffrey Garen  <ggaren@apple.com>
1274
1275         RS by Beth.
1276         
1277         Finished previously approved JSInternalString -> JSString conversion 
1278         by renaming the files.
1279
1280         * API/JSCallbackObject.cpp:
1281         * API/JSInternalStringRef.cpp: Removed.
1282         * API/JSInternalStringRef.h: Removed.
1283         * API/JSStringRef.cpp: Added.
1284         * API/JSStringRef.h: Added.
1285         * API/JavaScriptCore.h:
1286         * JavaScriptCore.xcodeproj/project.pbxproj:
1287
1288 2006-07-12  Geoffrey Garen  <ggaren@apple.com>
1289
1290         Reviewed by Maciej.
1291         
1292         - Removed context and exception parameters from JSObjectGetPropertyEnumerator,
1293         removing the spurious use of ExecState inside JavaScriptCore that made
1294         us think this was necessary in the first place.
1295
1296         (StringInstance::getPropertyList): Use getString instead of toString because
1297         we know we're dealing with a string -- we put it there in the first place.
1298         While we're at it, store the string's size instead of retrieving it each time 
1299         through the loop, to avoid the unnecessary killing of puppies.
1300         * kjs/string_object.h:
1301
1302 2006-07-12  Maciej Stachowiak  <mjs@apple.com>
1303
1304         Reviewed by Geoff.
1305         
1306         - add handling of hasInstance callback for API objects
1307
1308         * API/JSCallbackObject.cpp:
1309         (KJS::JSCallbackObject::implementsHasInstance): Check if callback is present.
1310         (KJS::JSCallbackObject::hasInstance): Invoke appropriate callback.
1311         * API/JSCallbackObject.h:
1312         * API/JSClassRef.cpp:
1313         * API/JSObjectRef.h:
1314         * API/testapi.c:
1315         (MyObject_hasInstance): Test case; should match what construct would do.
1316         * API/testapi.js:
1317
1318 2006-07-11  Geoffrey Garen  <ggaren@apple.com>
1319
1320         Reviewed by Maciej.
1321         
1322         - Implemented a vast number of renames and comment clarifications 
1323         suggested during API review.
1324         
1325         JSInternalString -> JSString
1326         JS*Make -> JSValueMake*, JSObjectMake*
1327         JSTypeCode -> JSType
1328         JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code)
1329         JSGC*Protect -> JSValue*Protect
1330         JS*Callback -> JSObject*Callback
1331         JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback
1332         JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName
1333         JSString* -> 
1334             JSStringCreateWithUTF8CString, JSStringGetUTF8CString,
1335             JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString, 
1336             JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters.
1337         
1338         - Changed functions taking a JSValue out arg and returning a bool indicating
1339         whether it was set to simply return a JSValue or NULL.
1340         
1341         - Removed JSStringGetCharacters because it's more documentation than code,
1342         and it's just a glorified memcpy built on existing API functionality.
1343         
1344         - Moved standard library includes into the headers that actually require them.
1345         
1346         - Standardized use of the phrase "Create Rule."
1347         
1348         - Removed JSLock from make functions that don't allocate.
1349         
1350         - Added exception handling to JSValueToBoolean, since we now allow
1351         callback objects to throw exceptions upon converting to boolean.
1352         
1353         - Renamed JSGCCollect to JSGarbageCollect.
1354
1355 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
1356
1357         Reviewed by Darin.
1358         
1359         - Changed public header includes to the <JavaScriptCore/ style.
1360         - Changed instances of 'buffer' to 'string' since we decided on
1361         JSInternalString instead of JSStringBuffer.
1362
1363         * API/JSContextRef.h:
1364         * API/JSInternalStringRef.cpp:
1365         (JSStringMake):
1366         (JSInternalStringRetain):
1367         (JSInternalStringRelease):
1368         (JSValueCopyStringValue):
1369         (JSInternalStringGetLength):
1370         (JSInternalStringGetCharactersPtr):
1371         (JSInternalStringGetCharacters):
1372         (JSInternalStringGetMaxLengthUTF8):
1373         (JSInternalStringGetCharactersUTF8):
1374         (CFStringCreateWithJSInternalString):
1375         * API/JSInternalStringRef.h:
1376         * API/JSNode.c:
1377         (JSNodePrototype_appendChild):
1378         (JSNode_getNodeType):
1379         * API/JSObjectRef.cpp:
1380         (JSObjectCallAsConstructor):
1381         * API/JSValueRef.h:
1382         * API/JavaScriptCore.h:
1383         * API/minidom.c:
1384         (main):
1385         (print):
1386         * API/testapi.c:
1387         (MyObject_getPropertyList):
1388         (myConstructor_callAsConstructor):
1389         (main): I noticed that we were prematurely releasing some string buffers,
1390         so I moved their release calls to the end of main(). I got rid of 'Buf' in *Buf
1391         (sometimes changing to 'IString', when necessary to differentiate a variable) 
1392         to match the buffer->string change.
1393
1394 === Safari-521.16 ===
1395
1396 2006-07-10  Darin Adler  <darin@apple.com>
1397
1398         * kjs/value.cpp: (KJS::JSValue::toInt32Inline): Added inline keyword one more place.
1399         Just in case.
1400
1401 2006-07-10  Darin Adler  <darin@apple.com>
1402
1403         - fix the release build
1404
1405         * kjs/value.h:
1406         * kjs/value.cpp:
1407         (KJS::JSValue::toInt32Inline): Move the code here to an inline.
1408         (KJS::JSValue::toInt32): Call the inline from both overloaded toInt32 functions.
1409
1410 2006-07-10  David Kilzer  <ddkilzer@kilzer.net>
1411
1412         Reviewed by Darin.
1413
1414         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=9179
1415           Implement select.options.add() method
1416
1417         * JavaScriptCore.exp: Added overloaded KJS::JSValue::toInt32() method.
1418         * JavaScriptCore.xcodeproj/project.pbxproj: Altered attributes metadata for
1419         kjs/value.h to make it available as a forwarded header.
1420         * kjs/lookup.h:
1421         (KJS::lookupPut): Extracted a lookupPut() method from the existing lookupPut() method.
1422         The new method returns a boolean value if no entry is found in the lookup table.
1423         * kjs/value.cpp:
1424         (KJS::JSValue::toInt32): Overloaded toInt32() method with boolean "Ok" argument.
1425         * kjs/value.h: Ditto.
1426
1427 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
1428
1429         No review necessary. Removed bogus file I accidentally checked in before.
1430
1431         * API/JSInternalSringRef.h: Removed.
1432
1433 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
1434
1435         Reviewed by Darin.
1436         
1437         Added exception out parameter to API object callbacks, removed semi-bogus
1438         JSContext(.*)Exception functions.
1439         
1440         To make these calls syntactically simple, I added an exceptionSlot()
1441         method to the ExecState class, which provides a JSValue** slot in which to 
1442         store a JSValue* exception.
1443
1444         * API/APICast.h:
1445         (toRef):
1446         * API/JSCallbackConstructor.cpp:
1447         (KJS::JSCallbackConstructor::construct):
1448         * API/JSCallbackFunction.cpp:
1449         (KJS::JSCallbackFunction::callAsFunction):
1450         * API/JSCallbackObject.cpp:
1451         (KJS::JSCallbackObject::init):
1452         (KJS::JSCallbackObject::getOwnPropertySlot):
1453         (KJS::JSCallbackObject::put):
1454         (KJS::JSCallbackObject::deleteProperty):
1455         (KJS::JSCallbackObject::construct):
1456         (KJS::JSCallbackObject::callAsFunction):
1457         (KJS::JSCallbackObject::getPropertyList):
1458         (KJS::JSCallbackObject::toBoolean):
1459         (KJS::JSCallbackObject::toNumber):
1460         (KJS::JSCallbackObject::toString):
1461         (KJS::JSCallbackObject::staticValueGetter):
1462         (KJS::JSCallbackObject::callbackGetter):
1463         * API/JSContextRef.cpp:
1464         (JSCheckSyntax):
1465         * API/JSContextRef.h:
1466         * API/JSNode.c:
1467         (JSNodePrototype_appendChild):
1468         (JSNodePrototype_removeChild):
1469         (JSNodePrototype_replaceChild):
1470         (JSNode_getNodeType):
1471         (JSNode_getChildNodes):
1472         (JSNode_getFirstChild):
1473         (JSNode_construct):
1474         * API/JSNode.h:
1475         * API/JSNodeList.c:
1476         (JSNodeListPrototype_item):
1477         (JSNodeList_length):
1478         (JSNodeList_getProperty):
1479         * API/JSObjectRef.h:
1480         * API/minidom.c:
1481         (print):
1482         * API/testapi.c:
1483         (MyObject_initialize):
1484         (MyObject_hasProperty):
1485         (MyObject_getProperty):
1486         (MyObject_setProperty):
1487         (MyObject_deleteProperty):
1488         (MyObject_getPropertyList):
1489         (MyObject_callAsFunction):
1490         (MyObject_callAsConstructor):
1491         (MyObject_convertToType):
1492         (print_callAsFunction):
1493         (myConstructor_callAsConstructor):
1494         (main):
1495         * JavaScriptCore.exp:
1496         * kjs/ExecState.h:
1497         (KJS::ExecState::exceptionHandle):
1498
1499 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
1500
1501         Reviewed by Darin.
1502
1503         Improved type safety by implementing opaque JSValue/JSObject typing through 
1504         abuse of 'const', not void*. Also fixed an alarming number of bugs
1505         exposed by this new type safety.
1506         
1507         I made one design change in JavaScriptCore, which is that the JSObject
1508         constructor should take a JSValue* as its prototype argument, not a JSObject*,
1509         since we allow the prototype to be any JSValue*, including jsNull(), for
1510         example.
1511         
1512         * API/APICast.h:
1513         (toJS):
1514         * API/JSBase.h:
1515         * API/JSCallbackConstructor.cpp:
1516         (KJS::JSCallbackConstructor::construct):
1517         * API/JSCallbackFunction.cpp:
1518         (KJS::JSCallbackFunction::callAsFunction):
1519         * API/JSCallbackObject.cpp:
1520         (KJS::JSCallbackObject::JSCallbackObject):
1521         (KJS::JSCallbackObject::getOwnPropertySlot):
1522         (KJS::JSCallbackObject::put):
1523         (KJS::JSCallbackObject::construct):
1524         (KJS::JSCallbackObject::callAsFunction):
1525         (KJS::JSCallbackObject::staticFunctionGetter):
1526         * API/JSCallbackObject.h:
1527         * API/JSContextRef.cpp:
1528         (JSEvaluate):
1529         * API/JSNode.c:
1530         (JSNodePrototype_appendChild):
1531         (JSNodePrototype_removeChild):
1532         (JSNodePrototype_replaceChild):
1533         * API/JSObjectRef.cpp:
1534         (JSObjectMake):
1535         (JSFunctionMakeWithBody):
1536         (JSObjectGetProperty):
1537         (JSObjectCallAsFunction):
1538         (JSObjectCallAsConstructor):
1539         * API/JSObjectRef.h:
1540         * API/testapi.c:
1541         (main):
1542         * ChangeLog:
1543         * kjs/object.h:
1544         (KJS::JSObject::JSObject):
1545
1546 2006-07-10  Geoffrey Garen  <ggaren@apple.com>
1547
1548         Approved by Maciej, Darin.
1549         
1550         Renamed JSStringBufferRef to JSInternalStringRef. "Internal string" means the 
1551         JavaScript engine's internal string representation, which is the most 
1552         low-level and efficient representation to use when interfacing with JavaScript.
1553
1554         * API/APICast.h:
1555         (toJS):
1556         (toRef):
1557         * API/JSBase.h:
1558         * API/JSCallbackObject.cpp:
1559         (KJS::JSCallbackObject::getOwnPropertySlot):
1560         (KJS::JSCallbackObject::put):
1561         (KJS::JSCallbackObject::deleteProperty):
1562         (KJS::JSCallbackObject::staticValueGetter):
1563         (KJS::JSCallbackObject::callbackGetter):
1564         * API/JSContextRef.cpp:
1565         (JSEvaluate):
1566         (JSCheckSyntax):
1567         * API/JSContextRef.h:
1568         * API/JSInternalStringRef.cpp: Added.
1569         (JSStringMake):
1570         (JSInternalStringCreate):
1571         (JSInternalStringCreateUTF8):
1572         (JSInternalStringRetain):
1573         (JSInternalStringRelease):
1574         (JSValueCopyStringValue):
1575         (JSInternalStringGetLength):
1576         (JSInternalStringGetCharactersPtr):
1577         (JSInternalStringGetCharacters):
1578         (JSInternalStringGetMaxLengthUTF8):
1579         (JSInternalStringGetCharactersUTF8):
1580         (JSInternalStringIsEqual):
1581         (JSInternalStringIsEqualUTF8):
1582         (JSInternalStringCreateCF):
1583         (CFStringCreateWithJSInternalString):
1584         * API/JSInternalStringRef.h: Added.
1585         * API/JSNode.c:
1586         (JSNodePrototype_appendChild):
1587         (JSNode_getNodeType):
1588         (JSNode_getChildNodes):
1589         (JSNode_getFirstChild):
1590         * API/JSNodeList.c:
1591         (JSNodeList_length):
1592         (JSNodeList_getProperty):
1593         * API/JSObjectRef.cpp:
1594         (JSFunctionMakeWithBody):
1595         (JSObjectGetDescription):
1596         (JSObjectHasProperty):
1597         (JSObjectGetProperty):
1598         (JSObjectSetProperty):
1599         (JSObjectDeleteProperty):
1600         (JSPropertyEnumeratorGetNext):
1601         (JSPropertyListAdd):
1602         * API/JSObjectRef.h:
1603         * API/JSStringBufferRef.cpp: Removed.
1604         * API/JSStringBufferRef.h: Removed.
1605         * API/JSValueRef.h:
1606         * API/JavaScriptCore.h:
1607         * API/minidom.c:
1608         (main):
1609         (print):
1610         * API/testapi.c:
1611         (assertEqualsAsUTF8String):
1612         (assertEqualsAsCharactersPtr):
1613         (assertEqualsAsCharacters):
1614         (MyObject_hasProperty):
1615         (MyObject_getProperty):
1616         (MyObject_setProperty):
1617         (MyObject_deleteProperty):
1618         (MyObject_getPropertyList):
1619         (print_callAsFunction):
1620         (myConstructor_callAsConstructor):
1621         (main):
1622         * JavaScriptCore.exp:
1623         * JavaScriptCore.xcodeproj/project.pbxproj:
1624
1625 2006-07-08  Tim Omernick  <timo@apple.com>
1626
1627         Reviewed by Maciej.
1628
1629         Added an OpenGL drawing model to the Netscape Plug-in API.
1630
1631         * bindings/npapi.h:
1632
1633 2006-07-08  Timothy Hatcher  <timothy@apple.com>
1634
1635         Reviewed by Maciej.
1636
1637         Moved KJS_GetCreatedJavaVMs to jni_utility.cpp.
1638         Switched KJS_GetCreatedJavaVMs over to use dlopen and dlsym
1639         now that NSAddImage, NSLookupSymbolInImage and NSAddressOfSymbol
1640         are deprecated in Leopard.
1641
1642         * JavaScriptCore.exp:
1643         * JavaScriptCore.xcodeproj/project.pbxproj:
1644         * bindings/jni/jni_utility.cpp:
1645         (KJS::Bindings::KJS_GetCreatedJavaVMs):
1646         * bindings/softlinking.c: Removed.
1647         * bindings/softlinking.h: Removed.
1648
1649 2006-07-08  Geoffrey Garen  <ggaren@apple.com>
1650
1651         Reviewed by Anders.
1652         
1653         - Make JSObjectGetProperty return a JSValue or NULL, like JSEvaluate does.
1654
1655         * API/JSObjectRef.cpp:
1656         (JSObjectGetProperty):
1657         * API/JSObjectRef.h:
1658         * API/testapi.c:
1659         (main):
1660
1661 2006-07-08  Geoffrey Garen  <ggaren@apple.com>
1662
1663         Style change -- no review necessary.
1664         
1665         Use 0 instead of NULL in API .cpp files, to match our style guidelines.
1666
1667         * API/JSContextRef.cpp:
1668         (JSEvaluate):
1669         * API/JSObjectRef.cpp:
1670         (JSFunctionMakeWithBody):
1671         (JSObjectCallAsFunction):
1672         (JSObjectCallAsConstructor):
1673         * API/JSValueRef.cpp:
1674         (JSValueToObject):
1675
1676 2006-07-08  Geoffrey Garen  <ggaren@apple.com>
1677
1678         Reviewed by TimO.
1679
1680         - Added ability to pass NULL for thisObject when calling JSObjectCallAsFunction,
1681         to match JSEvaluate.
1682         
1683         * API/JSObjectRef.cpp:
1684         (JSObjectCallAsFunction):
1685         * API/JSObjectRef.h:
1686         * API/testapi.c:
1687         (main):
1688
1689 === Safari-521.15 ===
1690
1691 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
1692
1693         Reviewed by Maciej.
1694         
1695         - Standardized which functions take a JSContext as an argument. The rule is:
1696         if you might execute JavaScript, you take a JSContext, otherwise you don't.
1697         
1698         The FIXME in JSObjectRef.h requires refactoring some parts of Interpreter,
1699         but not API changes, so I'm putting it off until later.
1700
1701         * API/JSCallbackObject.cpp:
1702         (KJS::JSCallbackObject::JSCallbackObject):
1703         (KJS::JSCallbackObject::init):
1704         * API/JSCallbackObject.h:
1705         * API/JSContextRef.cpp:
1706         (JSContextCreate):
1707         * API/JSContextRef.h:
1708         * API/JSObjectRef.cpp:
1709         (JSObjectMake):
1710         (JSPropertyEnumeratorGetNext):
1711         * API/JSObjectRef.h:
1712         * API/testapi.c:
1713         (MyObject_initialize):
1714         (main):
1715         * JavaScriptCore.exp:
1716         * kjs/array_object.cpp:
1717         (ArrayInstance::setLength):
1718         (ArrayInstance::pushUndefinedObjectsToEnd):
1719         * kjs/nodes.cpp:
1720         (ForInNode::execute):
1721         * kjs/reference.cpp:
1722         (KJS::Reference::getPropertyName):
1723         (KJS::Reference::getValue):
1724         * kjs/reference.h:
1725         * kjs/scope_chain.cpp:
1726         (KJS::ScopeChain::print):
1727
1728 2006-07-06  Geoffrey Garen  <ggaren@apple.com>
1729
1730         Reviewed by Maciej.
1731         
1732         More API action.
1733         
1734         - Headerdoc finished
1735
1736         Semantic Changes:
1737         - Added a JSContextRef argument to many functions, because you need a 
1738         JSContextRef for doing virtually anything. I expect to add this argument
1739         to even more functions in a future patch.
1740         
1741         - Removed the globalObjectPrototype argument to JSContextCreate because
1742         you can't create an object until you have a context, so it's impossible
1743         to pass a prototype object to JSContextCreate. That's OK because (1) there's
1744         no reason to give the global object a prototype and (2) if you really want
1745         to, you can just use a separate call to JSObjectSetPrototype.
1746         
1747         - Removed the JSClassRef argument to JSClassCreate because it was unnecessary,
1748         and you need to be able to make the global object's class before you've
1749         created a JSContext.
1750         
1751         - Added an optional exception parameter to JSFunctionMakeWithBody because anything
1752         less would be uncivilized.
1753         
1754         - Made the return value parameter to JSObjectGetProperty optional to match
1755         all other return value parameters in the API.
1756         
1757         - Made JSObjectSetPrivate/JSObjectGetPrivate work on JSCallbackFunctions
1758         and JSCallbackConstructors. You could use an abstract base class or strategic
1759         placement of m_privateData in the class structure to implement this, but 
1760         the former seemed like overkill, and the latter seemed too dangerous.
1761         
1762         - Fixed a bug where JSPropertyEnumeratorGetNext would skip the first property.
1763
1764         Cosmetic Changes:
1765         - Reversed the logic of the JSChar #ifdef to avoid confusing headerdoc
1766         
1767         - Removed function names from @function declarations because headeroc
1768         can parse them automatically, and I wanted to rule out manual mismatch.
1769
1770         - Changed Error::create to take a const UString& instead of a UString*
1771         because it was looking at me funny.
1772         
1773         - Renamed JSStringBufferCreateWithCFString to JSStringBufferCreateCF
1774         because the latter is more concise and it matches JSStringBufferCreateUTF8.
1775         
1776         * API/JSCallbackObject.cpp:
1777         (KJS::JSCallbackObject::getOwnPropertySlot):
1778         (KJS::JSCallbackObject::put):
1779         (KJS::JSCallbackObject::deleteProperty):
1780         (KJS::JSCallbackObject::getPropertyList):
1781         (KJS::JSCallbackObject::toBoolean):
1782         (KJS::JSCallbackObject::toNumber):
1783         (KJS::JSCallbackObject::toString):
1784         * API/JSClassRef.cpp:
1785         (JSClassCreate):
1786         * API/JSContextRef.cpp:
1787         (JSContextCreate):
1788         (JSContextSetException):
1789         * API/JSContextRef.h:
1790         * API/JSNode.c:
1791         (JSNodePrototype_class):
1792         (JSNode_class):
1793         * API/JSNodeList.c:
1794         (JSNodeListPrototype_class):
1795         (JSNodeList_class):
1796         * API/JSObjectRef.cpp:
1797         (JSObjectGetProperty):
1798         (JSObjectGetPrivate):
1799         (JSObjectSetPrivate):
1800         (JSObjectCallAsFunction):
1801         (JSObjectCallAsConstructor):
1802         (JSPropertyEnumeratorGetNext):
1803         * API/JSObjectRef.h:
1804         * API/JSStringBufferRef.cpp:
1805         (JSStringBufferCreateCF):
1806         * API/JSStringBufferRef.h:
1807         * API/JSValueRef.cpp:
1808         (JSValueIsInstanceOf):
1809         * API/JSValueRef.h:
1810         * API/minidom.c:
1811         (main):
1812         * API/minidom.js:
1813         * API/testapi.c:
1814         (MyObject_hasProperty):
1815         (MyObject_setProperty):
1816         (MyObject_deleteProperty):
1817         (MyObject_getPropertyList):
1818         (MyObject_convertToType):
1819         (MyObject_class):
1820         (main):
1821         * JavaScriptCore.exp:
1822
1823 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
1824
1825         Reviewed by John.
1826         
1827         - Fixed a few crashes resulting from NULL parameters to JSClassCreate.
1828
1829         * API/JSClassRef.cpp:
1830         (JSClassCreate):
1831         (JSClassRelease):
1832         * API/testapi.c: Added test for NULL parameters.
1833         (main):
1834
1835 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
1836
1837         Reviewed by John, mocked by Darin.
1838         
1839         - Changed JSEvaluate to take a JSObjectRef instead of a JSValueRef as
1840         "this," since "this" must be an object.
1841
1842         * API/JSContextRef.cpp:
1843         (JSEvaluate):
1844         * API/JSContextRef.h:
1845
1846 2006-07-07  Geoffrey Garen  <ggaren@apple.com>
1847
1848         Reviewed by John.
1849         
1850         - More headerdoc
1851
1852         * API/JSBase.h:
1853         * JavaScriptCore.xcodeproj/project.pbxproj:
1854
1855 2006-07-05  Geoffrey Garen  <ggaren@apple.com>
1856
1857         RS by Beth.
1858         
1859         Renamed JSCharBufferRef, which was universally unpopular, to JSStringBufferRef,
1860         which, hopefully, will be less unpopular.
1861
1862         * API/APICast.h:
1863         (toJS):
1864         (toRef):
1865         * API/JSBase.h:
1866         * API/JSCallbackObject.cpp:
1867         (KJS::JSCallbackObject::getOwnPropertySlot):
1868         (KJS::JSCallbackObject::put):
1869         (KJS::JSCallbackObject::deleteProperty):
1870         (KJS::JSCallbackObject::staticValueGetter):
1871         (KJS::JSCallbackObject::callbackGetter):
1872         * API/JSCharBufferRef.cpp: Removed.
1873         * API/JSCharBufferRef.h: Removed.
1874         * API/JSContextRef.cpp:
1875         (JSEvaluate):
1876         (JSCheckSyntax):
1877         * API/JSContextRef.h:
1878         * API/JSNode.c:
1879         (JSNodePrototype_appendChild):
1880         (JSNode_getNodeType):
1881         (JSNode_getChildNodes):
1882         (JSNode_getFirstChild):
1883         * API/JSNodeList.c:
1884         (JSNodeList_length):
1885         (JSNodeList_getProperty):
1886         * API/JSObjectRef.cpp:
1887         (JSFunctionMakeWithBody):
1888         (JSObjectGetDescription):
1889         (JSObjectHasProperty):
1890         (JSObjectGetProperty):
1891         (JSObjectSetProperty):
1892         (JSObjectDeleteProperty):
1893         (JSPropertyEnumeratorGetNext):
1894         (JSPropertyListAdd):
1895         * API/JSObjectRef.h:
1896         * API/JSStringBufferRef.cpp: Added.
1897         (JSStringMake):
1898         (JSStringBufferCreate):
1899         (JSStringBufferCreateUTF8):
1900         (JSStringBufferRetain):
1901         (JSStringBufferRelease):
1902         (JSValueCopyStringValue):
1903         (JSStringBufferGetLength):
1904         (JSStringBufferGetCharactersPtr):
1905         (JSStringBufferGetCharacters):
1906         (JSStringBufferGetMaxLengthUTF8):
1907         (JSStringBufferGetCharactersUTF8):
1908         (JSStringBufferIsEqual):
1909         (JSStringBufferIsEqualUTF8):
1910         (JSStringBufferCreateWithCFString):
1911         (CFStringCreateWithJSStringBuffer):
1912         * API/JSStringBufferRef.h: Added.
1913         * API/JSValueRef.h:
1914         * API/JavaScriptCore.h:
1915         * API/minidom.c:
1916         (main):
1917         (print):
1918         * API/testapi.c:
1919         (assertEqualsAsUTF8String):
1920         (assertEqualsAsCharactersPtr):
1921         (assertEqualsAsCharacters):
1922         (MyObject_hasProperty):
1923         (MyObject_getProperty):
1924         (MyObject_setProperty):
1925         (MyObject_deleteProperty):
1926         (MyObject_getPropertyList):
1927         (print_callAsFunction):
1928         (myConstructor_callAsConstructor):
1929         (main):
1930         * JavaScriptCore.exp:
1931         * JavaScriptCore.xcodeproj/project.pbxproj:
1932
1933 2006-07-05  Geoffrey Garen  <ggaren@apple.com>
1934
1935         RS by Beth.
1936         
1937         Moved some code around for more logical file separation.
1938
1939         * API/JSBase.h:
1940         * API/JSContextRef.h:
1941         * API/JSObjectRef.cpp:
1942         * API/JSValueRef.cpp:
1943         (JSValueToObject):
1944         * API/JSValueRef.h:
1945
1946 2006-07-03  Geoffrey Garen  <ggaren@apple.com>
1947
1948         Reviewed by Maciej.
1949         
1950         Implemented JSFunctionMakeWithBody, which parses a script as a function body
1951         in the global scope, and returns the resulting anonymous function.
1952         
1953         I also removed private data from JSCallbackFunction. It never worked,
1954         since JSCallbackFunction doesn't inherit from JSCallbackObject.
1955
1956         * API/JSCallbackConstructor.cpp: Removed.
1957         * API/JSCallbackConstructor.h: Removed.
1958         * API/JSCallbackFunction.cpp:
1959         (KJS::JSCallbackFunction::JSCallbackFunction):
1960         (KJS::JSCallbackFunction::implementsConstruct):
1961         (KJS::JSCallbackFunction::construct):
1962         (KJS::JSCallbackFunction::implementsCall):
1963         (KJS::JSCallbackFunction::callAsFunction):
1964         * API/JSCallbackFunction.h:
1965         * API/JSCallbackObject.cpp:
1966         (KJS::JSCallbackObject::staticFunctionGetter):
1967         * API/JSObjectRef.cpp:
1968         (JSFunctionMake):
1969         (JSFunctionMakeWithCallbacks):
1970         * API/JSObjectRef.h:
1971         * API/JSValueRef.h:
1972         * API/minidom.c:
1973         (main):
1974         * API/testapi.c:
1975         (main):
1976         * JavaScriptCore.exp: Programmatically added all symbols exported by
1977         API object files, and sorted results
1978         * JavaScriptCore.xcodeproj/project.pbxproj:
1979
1980 2006-07-03  Geoffrey Garen  <ggaren@apple.com>
1981
1982         Reviewed by Maciej.
1983
1984         - Return syntax error in JSCheckSyntax through a JSValueRef* exception
1985         argument
1986         
1987         * API/JSBase.h:
1988         * API/JSContextRef.cpp:
1989         (JSCheckSyntax):
1990         * API/testapi.c:
1991         (main):
1992         * JavaScriptCore.exp:
1993         * kjs/interpreter.cpp:
1994         (KJS::Interpreter::checkSyntax):
1995         * kjs/interpreter.h:
1996
1997 2006-07-04  Darin Adler  <darin@apple.com>
1998
1999         - fixed build
2000
2001         * wtf/MathExtras.h: Oops. Added missing #endif.
2002
2003 2006-07-04  Bjoern Graf  <bjoern.graf@gmail.com>
2004
2005         Reviewed by Maciej.
2006         Tweaked a bit by Darin.
2007
2008         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9678
2009           work around MSVCRT's fmod function returning NaN for fmod(x, infinity) instead of x
2010
2011         * wtf/MathExtras.h: Added include of <float.h>.
2012         (isinf): Fix to return false for NAN.
2013         (wtf_fmod): Added. An inline that works around the bug.
2014
2015         * kjs/nodes.cpp:
2016         * kjs/number_object.cpp:
2017         * kjs/operations.cpp:
2018         * kjs/value.cpp:
2019         Added includes of MathExtras.h to all files using fmod.
2020
2021         * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode 2.3 have its way with
2022         the project.
2023
2024 2006-07-01  Geoffrey Garen  <ggaren@apple.com>
2025
2026         Reviewed by Darin.
2027         
2028         - Refined value conversions in the API:
2029             - failed toNumber returns NaN
2030             - failed toObject returns NULL
2031             - failed toString returns empty string
2032         
2033         - Refined excpetion handling in the API:
2034             - failed value conversions do not throw exceptions
2035             - uncaught exceptions in JSEvaluate, JSObjectCallAsFunction, and 
2036               JSObjectCallAsConstructor are returned through a JSValueRef* exception
2037               argument
2038             - removed JSContextHasException, because JSContextGetException does
2039               the same job
2040             
2041         * API/JSBase.h:
2042         * API/JSCharBufferRef.cpp:
2043         (JSValueCopyStringValue):
2044         * API/JSContextRef.cpp:
2045         (JSEvaluate):
2046         * API/JSContextRef.h:
2047         * API/JSNodeList.c: Added test code demonstrating how you would use
2048         toNumber, and why you probably don't need toUInt32, etc.
2049         (JSNodeListPrototype_item):
2050         (JSNodeList_getProperty):
2051         * API/JSObjectRef.cpp:
2052         (JSValueToObject):
2053         (JSObjectCallAsFunction):
2054         (JSObjectCallAsConstructor):
2055         * API/JSObjectRef.h:
2056         * API/JSValueRef.cpp:
2057         (JSValueToNumber):
2058         * API/JSValueRef.h:
2059         * API/minidom.c:
2060         (main):
2061         * API/testapi.c:
2062         (main): Added tests for new rules, and call to JSGCProtect to fix Intel 
2063         crash
2064         * JavaScriptCore.exp:
2065
2066 2006-07-03  Darin Adler  <darin@apple.com>
2067
2068         - Rolled out HashMap implementation of NPRuntime, at least temporarily.
2069
2070         Fixes hang in the bindings section of layout tests seen on the
2071         buildbot.
2072
2073         This code was using HashMap<const char*, PrivateIdentifier*>.
2074         But that hashes based on pointer identity, not string value.
2075         The default hash for any pointer type is to hash based on the pointer.
2076         And WTF doesn't currently have a string hash for char*.
2077         We'll need to fix that before re-landing this patch.
2078
2079         (Formatting was also incorrect -- extra spaces in parentheses.)
2080
2081         * bindings/npruntime.cpp: Rolled out last change.
2082
2083 2006-07-02  Justin Haygood  <jhaygood@spsu.edu>
2084
2085         Reviewed, tweaked, landed by ggaren.
2086
2087         - Port NPRuntime from CFDictionary to HashMap.
2088
2089         * bindings/npruntime.cpp:
2090         (getStringIdentifierDictionary):
2091         (getIntIdentifierDictionary):
2092         (_NPN_GetStringIdentifier):
2093         (_NPN_GetIntIdentifier):
2094         * bindings/npruntime.h:
2095
2096 2006-07-01  Geoffrey Garen  <ggaren@apple.com>
2097
2098         Reviewed by Adele.
2099         
2100         - Fixed <rdar://problem/4611197> REGRESSION: Liveconnect with Java test 
2101         fails at http://www-sor.inria.fr/~dedieu/notes/liveconnect/simple_example.html
2102
2103         * JavaScriptCore.exp: Export symbols used by liveconnect
2104
2105 2006-06-29  Geoffrey Garen  <ggaren@apple.com>
2106
2107         Reviewed by Maciej.
2108         
2109         - Phase 2 in the JS API.
2110         
2111         - Added support for specifying static tables of values -- this should
2112         obviate the need for using complicated callbacks for most lookups.
2113         
2114         -  API objects are now created with classes (JSClassRef) -- in order to support
2115         static values, and in order to prevent API objects from storing their
2116         data inline, and thus falling into the oversized (read: slow and prone to
2117         giving Maciej the frowny face) heap.
2118         
2119         - Added two specialized JSObject subclasses -- JSCallbackFunction and JSCallbackConstructor -- 
2120         to allow JSFunctionMake and JSConstructorMake to continue to work with
2121         the new class model. Another solution to this problem would be to create
2122         a custom class object for each function and constructor you make. This
2123         solution is more code but also more efficient.
2124         
2125         - Substantially beefed up the minidom example to demonstrate and test a
2126         lot of these techniques. Its output is still pretty haphazard, though.
2127         
2128         - Gave the <kjs/ preface to some includes -- I'm told this matters to
2129         building on some versions of Linux.
2130         
2131         - Implemented JSValueIsInstanceOf and JSValueIsObjectOfClass
2132         
2133         - Removed GetDescription callback. Something in the class datastructure
2134         should take care of this.
2135
2136         * API/JSBase.h:
2137         * API/JSCallbackConstructor.cpp: Added.
2138         (KJS::):
2139         (KJS::JSCallbackConstructor::JSCallbackConstructor):
2140         (KJS::JSCallbackConstructor::implementsConstruct):
2141         (KJS::JSCallbackConstructor::construct):
2142         (KJS::JSCallbackConstructor::setPrivate):
2143         (KJS::JSCallbackConstructor::getPrivate):
2144         * API/JSCallbackConstructor.h: Added.
2145         (KJS::JSCallbackConstructor::classInfo):
2146         * API/JSCallbackFunction.cpp: Added.
2147         (KJS::):
2148         (KJS::JSCallbackFunction::JSCallbackFunction):
2149         (KJS::JSCallbackFunction::implementsCall):
2150         (KJS::JSCallbackFunction::callAsFunction):
2151         (KJS::JSCallbackFunction::setPrivate):
2152         (KJS::JSCallbackFunction::getPrivate):
2153         * API/JSCallbackFunction.h: Added.
2154         (KJS::JSCallbackFunction::classInfo):
2155         * API/JSCallbackObject.cpp:
2156         (KJS::):
2157         (KJS::JSCallbackObject::JSCallbackObject):
2158         (KJS::JSCallbackObject::init):
2159         (KJS::JSCallbackObject::~JSCallbackObject):
2160         (KJS::JSCallbackObject::className):
2161         (KJS::JSCallbackObject::getOwnPropertySlot):
2162         (KJS::JSCallbackObject::put):
2163         (KJS::JSCallbackObject::deleteProperty):
2164         (KJS::JSCallbackObject::implementsConstruct):
2165         (KJS::JSCallbackObject::construct):
2166         (KJS::JSCallbackObject::implementsCall):
2167         (KJS::JSCallbackObject::callAsFunction):
2168         (KJS::JSCallbackObject::getPropertyList):
2169         (KJS::JSCallbackObject::toBoolean):
2170         (KJS::JSCallbackObject::toNumber):
2171         (KJS::JSCallbackObject::toString):
2172         (KJS::JSCallbackObject::inherits):
2173         (KJS::JSCallbackObject::staticValueGetter):
2174         (KJS::JSCallbackObject::staticFunctionGetter):
2175         (KJS::JSCallbackObject::callbackGetter):
2176         * API/JSCallbackObject.h:
2177         * API/JSCharBufferRef.cpp:
2178         * API/JSClassRef.cpp: Added.
2179         (JSClassCreate):
2180         (JSClassRetain):
2181         (JSClassRelease):
2182         * API/JSClassRef.h: Added.
2183         (StaticValueEntry::StaticValueEntry):
2184         (StaticFunctionEntry::StaticFunctionEntry):
2185         (__JSClass::__JSClass):
2186         * API/JSContextRef.cpp:
2187         (JSContextCreate):
2188         (JSEvaluate):
2189         * API/JSContextRef.h:
2190         * API/JSNode.c: Added.
2191         (JSNodePrototype_appendChild):
2192         (JSNodePrototype_removeChild):
2193         (JSNodePrototype_replaceChild):
2194         (JSNodePrototype_class):
2195         (JSNode_getNodeType):
2196         (JSNode_getChildNodes):
2197         (JSNode_getFirstChild):
2198         (JSNode_finalize):
2199         (JSNode_class):
2200         (JSNode_prototype):
2201         (JSNode_new):
2202         (JSNode_construct):
2203         * API/JSNode.h: Added.
2204         * API/JSNodeList.c: Added.
2205         (JSNodeListPrototype_item):
2206         (JSNodeListPrototype_class):
2207         (JSNodeList_length):
2208         (JSNodeList_getProperty):
2209         (JSNodeList_finalize):
2210         (JSNodeList_class):
2211         (JSNodeList_prototype):
2212         (JSNodeList_new):
2213         * API/JSNodeList.h: Added.
2214         * API/JSObjectRef.cpp:
2215         (JSObjectMake):
2216         (JSFunctionMake):
2217         (JSConstructorMake):
2218         (__JSPropertyEnumerator::__JSPropertyEnumerator):
2219         (JSObjectCreatePropertyEnumerator):
2220         (JSPropertyEnumeratorGetNext):
2221         (JSPropertyEnumeratorRetain):
2222         (JSPropertyEnumeratorRelease):
2223         * API/JSObjectRef.h:
2224         (__JSObjectCallbacks::):
2225         * API/JSValueRef.cpp:
2226         (JSValueIsObjectOfClass):
2227         (JSValueIsInstanceOf):
2228         * API/JSValueRef.h:
2229         * API/Node.c: Added.
2230         (Node_new):
2231         (Node_appendChild):
2232         (Node_removeChild):
2233         (Node_replaceChild):
2234         (Node_ref):
2235         (Node_deref):
2236         * API/Node.h: Added.
2237         * API/NodeList.c: Added.
2238         (NodeList_new):
2239         (NodeList_length):
2240         (NodeList_item):
2241         (NodeList_ref):
2242         (NodeList_deref):
2243         * API/NodeList.h: Added.
2244         * API/minidom.c:
2245         (main):
2246         (print):
2247         (createStringWithContentsOfFile):
2248         * API/minidom.js:
2249         * API/testapi.c:
2250         (assertEqualsAsCharacters):
2251         (MyObject_getProperty):
2252         (MyObject_class):
2253         (myConstructor_callAsConstructor):
2254         (main):
2255         * API/testapi.js:
2256         * JavaScriptCore.xcodeproj/project.pbxproj:
2257
2258 2006-06-26  Kevin Ollivier  <kevino@theolliviers.com>
2259         
2260         Reviewed and tweaked by Darin.
2261
2262         - Compile fixes for wx port / gcc 4.0.2
2263
2264         * kjs/array_object.cpp:
2265         Added missing headers. 
2266
2267         * kjs/ExecState.h:
2268         gcc needs class prototypes before defining those classes as friend classes
2269
2270 2006-06-30  Mike Emmel  <mike.emmel@gmail.com>
2271
2272         Reviewed by Darin.
2273
2274         Compilation fixes for Linux/Gdk.
2275
2276         * JavaScriptCore/kjs/interpreter.cpp: added include of signal.h
2277         * JavaScriptCore/kjs/ExecState.h: added missing class declaration 
2278         * JavaScriptCore/kjs/ExecState.cpp: case wrong on include of context.h 
2279         * JavaScriptCore/JavaScriptCoreSources.bkl: added Context.cpp and ExecState.cpp
2280
2281 === Safari-521.14 ===
2282
2283 2006-06-29  Maciej Stachowiak  <mjs@apple.com>
2284
2285         Reviewed by Geoff.
2286         
2287         - add headerdoc comments to some of the new JS API headers
2288
2289         * API/JSBase.h:
2290         * API/JSValueRef.h:
2291
2292 2006-06-28  Timothy Hatcher  <timothy@apple.com>
2293
2294         Prefer the Stabs debugging symbols format until DWARF bugs are fixed.
2295
2296         * JavaScriptCore.xcodeproj/project.pbxproj:
2297
2298 2006-06-27  Timothy Hatcher  <timothy@apple.com>
2299
2300         Reviewed by Tim O.
2301
2302         <rdar://problem/4448350> Deprecated ObjC language API used in JavaScriptCore, WebCore, WebKit and WebBrowser
2303
2304         Switch to the new ObjC 2 API, ifdefed the old code around OBJC_API_VERSION so it still works on Tiger.
2305         Removed the use of the old stringWithCString, switched to the new Tiger version that accepts an encoding.
2306         Lots of code style cleanup.
2307
2308         * JavaScriptCore.xcodeproj/project.pbxproj:
2309         * bindings/objc/objc_class.h:
2310         * bindings/objc/objc_class.mm:
2311         (KJS::Bindings::ObjcClass::~ObjcClass):
2312         (KJS::Bindings::_createClassesByIsAIfNecessary):
2313         (KJS::Bindings::ObjcClass::classForIsA):
2314         (KJS::Bindings::ObjcClass::name):
2315         (KJS::Bindings::ObjcClass::methodsNamed):
2316         (KJS::Bindings::ObjcClass::fieldNamed):
2317         (KJS::Bindings::ObjcClass::fallbackObject):
2318         * bindings/objc/objc_header.h:
2319         * bindings/objc/objc_instance.h:
2320         * bindings/objc/objc_instance.mm:
2321         (ObjcInstance::ObjcInstance):
2322         (ObjcInstance::~ObjcInstance):
2323         (ObjcInstance::operator=):
2324         (ObjcInstance::begin):
2325         (ObjcInstance::end):
2326         (ObjcInstance::getClass):
2327         (ObjcInstance::invokeMethod):
2328         (ObjcInstance::invokeDefaultMethod):
2329         (ObjcInstance::setValueOfField):
2330         (ObjcInstance::supportsSetValueOfUndefinedField):
2331         (ObjcInstance::setValueOfUndefinedField):
2332         (ObjcInstance::getValueOfField):
2333         (ObjcInstance::getValueOfUndefinedField):
2334         (ObjcInstance::defaultValue):
2335         (ObjcInstance::stringValue):
2336         (ObjcInstance::numberValue):
2337         (ObjcInstance::booleanValue):
2338         (ObjcInstance::valueOf):
2339         * bindings/objc/objc_runtime.h:
2340         * bindings/objc/objc_runtime.mm:
2341         (ObjcMethod::ObjcMethod):
2342         (ObjcMethod::name):
2343         (ObjcMethod::getMethodSignature):
2344         (ObjcMethod::setJavaScriptName):
2345         (ObjcField::name):
2346         (ObjcField::type):
2347         (ObjcField::valueFromInstance):
2348         (convertValueToObjcObject):
2349         (ObjcField::setValueToInstance):
2350         (ObjcArray::operator=):
2351         (ObjcArray::setValueAt):
2352         (ObjcArray::valueAt):
2353         (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
2354         (ObjcFallbackObjectImp::callAsFunction):
2355         (ObjcFallbackObjectImp::defaultValue):
2356
2357 2006-06-28  Anders Carlsson  <acarlsson@apple.com>
2358
2359         Reviewed by Geoff.
2360
2361         http://bugzilla.opendarwin.org/show_bug.cgi?id=8636
2362         REGRESSION: JavaScript access to Java applet causes hang (_webViewURL not implemented)
2363
2364         * bindings/jni/jni_objc.mm:
2365         (KJS::Bindings::dispatchJNICall):
2366         Just pass nil as the calling URL. This will cause the Java plugin to use the URL of the page
2367         containing the applet (which is what we used to do).
2368
2369 2006-06-27  Timothy Hatcher  <timothy@apple.com>
2370
2371         Reviewed by Darin.
2372
2373         <rdar://problem/4406785> Add an export file to TOT JavaScriptCore like the Safari-2-0-branch
2374
2375         * JavaScriptCore.exp: Added.
2376         * JavaScriptCore.xcodeproj/project.pbxproj:
2377
2378 2006-06-25  Geoffrey Garen  <ggaren@apple.com>
2379
2380         Reviewed by Adele.
2381         
2382         - Added JSConstructorMake to match JSFunctionMake, along with test code.
2383         
2384         [ I checked in the ChangeLog before without the actual files. ]
2385
2386         * API/JSObjectRef.cpp:
2387         (JSConstructorMake):
2388         * API/JSObjectRef.h:
2389         * API/testapi.c:
2390         (myConstructor_callAsConstructor):
2391         (main):
2392         * API/testapi.js:
2393         * ChangeLog:
2394         * JavaScriptCore.xcodeproj/project.pbxproj: Moved testapi.c to the testapi
2395         target -- this was an oversight in my earlier check-in.
2396
2397 2006-06-25  Timothy Hatcher  <timothy@apple.com>
2398
2399         Reviewed by Darin.
2400
2401         Bug 9574: Drosera should show inline scripts within the original HTML
2402         http://bugzilla.opendarwin.org/show_bug.cgi?id=9574
2403
2404         Pass the starting line number and error message to the debugger.
2405
2406         * kjs/debugger.cpp:
2407         (Debugger::sourceParsed):
2408         * kjs/debugger.h:
2409         * kjs/function.cpp:
2410         (KJS::GlobalFuncImp::callAsFunction):
2411         * kjs/function_object.cpp:
2412         (FunctionObjectImp::construct):
2413         * kjs/interpreter.cpp:
2414         (KJS::Interpreter::evaluate):
2415
2416 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
2417
2418         Rubber-stamped by Eric.
2419
2420         Add a -h (do not follow symlinks) option to ln in derived sources build script (without it,
2421         a symlink was created inside the source directory on second build).
2422
2423         * JavaScriptCore.xcodeproj/project.pbxproj:
2424
2425 2006-06-24  David Kilzer  <ddkilzer@kilzer.net>
2426
2427         Reviewed by Timothy.
2428
2429         * Info.plist: Fixed copyright to include 2003-2006.
2430
2431 2006-06-24  Alexey Proskuryakov  <ap@nypop.com>
2432
2433         Reviewed by Darin.
2434
2435         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9418
2436         WebKit will not build when Space exists in path
2437
2438         * JavaScriptCore.xcodeproj/project.pbxproj: Enclose search paths in quotes; create symlinks to 
2439         avoid passing paths with spaces to make.
2440
2441 2006-06-23  Timothy Hatcher  <timothy@apple.com>
2442
2443         Reviewed by Darin.
2444
2445         Adding more operator[] overloads for long and short types.
2446
2447         * wtf/Vector.h:
2448         (WTF::Vector::operator[]):
2449
2450 === JavaScriptCore-521.13 ===
2451
2452 2006-06-22  Alexey Proskuryakov  <ap@nypop.com>
2453
2454         Build fix.
2455
2456         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9539
2457         Another case error preventing build
2458
2459         * API/JSObjectRef.cpp: Changed "identifier.h" to "Identifier.h"
2460         
2461 2006-06-22  David Kilzer  <ddkilzer@kilzer.net>
2462
2463         Build fix.
2464
2465         http://bugzilla.opendarwin.org/show_bug.cgi?id=9539
2466         Another case error preventing build
2467
2468         * API/APICast.h: Changed "UString.h" to "ustring.h".
2469
2470 2006-06-21  Geoffrey Garen  <ggaren@apple.com>
2471
2472         Fixed release build, fixed accidental infinite recursion due to
2473         last minute global replace gone awry.
2474         
2475         * API/APICast.h:
2476         (toRef):
2477         * API/testapi.c:
2478         (assertEqualsAsBoolean):
2479         (assertEqualsAsNumber):
2480         (assertEqualsAsUTF8String):
2481         (assertEqualsAsCharactersPtr):
2482         * JavaScriptCore.xcodeproj/project.pbxproj:
2483
2484 2006-06-21  Geoffrey Garen  <ggaren@apple.com>
2485
2486         Reviewed by Anders.
2487         
2488         - First cut at C API to JavaScript. Includes a unit test, 'testapi.c', 
2489         and the outline of a test app, 'minidom.c'.
2490         
2491         Includes one change to JSC internals: Rename propList to getPropertyList and have it
2492         take its target property list by reference so that subclasses can
2493         add properties to the list before calling through to their superclasses.
2494         
2495         Also, I just ran prepare-ChangeLog in about 10 seconds, and I would like
2496         to give a shout-out to that.
2497         
2498         * API/APICast.h: Added.
2499         (toJS):
2500         (toRef):
2501         * API/JSBase.h: Added.
2502         * API/JSCallbackObject.cpp: Added.
2503         (KJS::):
2504         (KJS::JSCallbackObject::JSCallbackObject):
2505         (KJS::JSCallbackObject::~JSCallbackObject):
2506         (KJS::JSCallbackObject::className):
2507         (KJS::JSCallbackObject::getOwnPropertySlot):
2508         (KJS::JSCallbackObject::put):
2509         (KJS::JSCallbackObject::deleteProperty):
2510         (KJS::JSCallbackObject::implementsConstruct):
2511         (KJS::JSCallbackObject::construct):
2512         (KJS::JSCallbackObject::implementsCall):
2513         (KJS::JSCallbackObject::callAsFunction):
2514         (KJS::JSCallbackObject::getPropertyList):
2515         (KJS::JSCallbackObject::toBoolean):
2516         (KJS::JSCallbackObject::toNumber):
2517         (KJS::JSCallbackObject::toString):
2518         (KJS::JSCallbackObject::setPrivate):
2519         (KJS::JSCallbackObject::getPrivate):
2520         (KJS::JSCallbackObject::cachedValueGetter):
2521         (KJS::JSCallbackObject::callbackGetter):
2522         * API/JSCallbackObject.h: Added.
2523         (KJS::JSCallbackObject::classInfo):
2524         * API/JSCharBufferRef.cpp: Added.
2525         (JSStringMake):
2526         (JSCharBufferCreate):
2527         (JSCharBufferCreateUTF8):
2528         (JSCharBufferRetain):
2529         (JSCharBufferRelease):
2530         (JSValueCopyStringValue):
2531         (JSCharBufferGetLength):
2532         (JSCharBufferGetCharactersPtr):
2533         (JSCharBufferGetCharacters):
2534         (JSCharBufferGetMaxLengthUTF8):
2535         (JSCharBufferGetCharactersUTF8):
2536         (JSCharBufferIsEqual):
2537         (JSCharBufferIsEqualUTF8):
2538         (JSCharBufferCreateWithCFString):
2539         (CFStringCreateWithJSCharBuffer):
2540         * API/JSCharBufferRef.h: Added.
2541         * API/JSContextRef.cpp: Added.
2542         (JSContextCreate):
2543         (JSContextDestroy):
2544         (JSContextGetGlobalObject):
2545         (JSEvaluate):
2546         (JSCheckSyntax):
2547         (JSContextHasException):
2548         (JSContextGetException):
2549         (JSContextClearException):
2550         (JSContextSetException):
2551         * API/JSContextRef.h: Added.
2552         * API/JSObjectRef.cpp: Added.
2553         (JSValueToObject):
2554         (JSObjectMake):
2555         (JSFunctionMake):
2556         (JSObjectGetDescription):
2557         (JSObjectGetPrototype):
2558         (JSObjectSetPrototype):
2559         (JSObjectHasProperty):
2560         (JSObjectGetProperty):
2561         (JSObjectSetProperty):
2562         (JSObjectDeleteProperty):
2563         (JSObjectGetPrivate):
2564         (JSObjectSetPrivate):
2565         (JSObjectIsFunction):
2566         (JSObjectCallAsFunction):
2567         (JSObjectIsConstructor):
2568         (JSObjectCallAsConstructor):
2569         (__JSPropertyListEnumerator::__JSPropertyListEnumerator):
2570         (JSObjectCreatePropertyEnumerator):
2571         (JSPropertyEnumeratorGetNext):
2572         (JSPropertyEnumeratorRetain):
2573         (JSPropertyEnumeratorRelease):
2574         (JSPropertyListAdd):
2575         * API/JSObjectRef.h: Added.
2576         * API/JSValueRef.cpp: Added.
2577         (JSValueGetType):
2578         (JSValueIsUndefined):
2579         (JSValueIsNull):
2580         (JSValueIsBoolean):
2581         (JSValueIsNumber):
2582         (JSValueIsString):
2583         (JSValueIsObject):
2584         (JSValueIsEqual):
2585         (JSValueIsStrictEqual):
2586         (JSUndefinedMake):
2587         (JSNullMake):
2588         (JSBooleanMake):
2589         (JSNumberMake):
2590         (JSValueToBoolean):
2591         (JSValueToNumber):
2592         (JSGCProtect):
2593         (JSGCUnprotect):
2594         (JSGCCollect):
2595         * API/JSValueRef.h: Added.
2596         * API/JavaScriptCore.h: Added.
2597         * API/minidom.c: Added.
2598         (main):
2599         * API/minidom.html: Added.
2600         * API/minidom.js: Added.
2601         * API/testapi.c: Added.
2602         (assertEqualsAsBoolean):
2603         (assertEqualsAsNumber):
2604         (assertEqualsAsUTF8String):
2605         (assertEqualsAsCharactersPtr):
2606         (assertEqualsAsCharacters):
2607         (MyObject_initialize):
2608         (MyObject_copyDescription):
2609         (MyObject_hasProperty):
2610         (MyObject_getProperty):
2611         (MyObject_setProperty):
2612         (MyObject_deleteProperty):
2613         (MyObject_getPropertyList):
2614         (MyObject_callAsFunction):
2615         (MyObject_callAsConstructor):
2616         (MyObject_convertToType):
2617         (MyObject_finalize):
2618         (print_callAsFunction):
2619         (main):
2620         (createStringWithContentsOfFile):
2621         * API/testapi.js: Added.
2622         * ChangeLog:
2623         * JavaScriptCore.xcodeproj/project.pbxproj:
2624         * bindings/npruntime_impl.h:
2625         * kjs/array_instance.h:
2626         * kjs/array_object.cpp:
2627         (ArrayInstance::getPropertyList):
2628         * kjs/interpreter.cpp:
2629         (KJS::Interpreter::evaluate):
2630         * kjs/nodes.cpp:
2631         (ForInNode::execute):
2632         * kjs/object.cpp:
2633         (KJS::JSObject::put):
2634         (KJS::JSObject::canPut):
2635         (KJS::JSObject::deleteProperty):
2636         (KJS::JSObject::propertyIsEnumerable):
2637         (KJS::JSObject::getPropertyAttributes):
2638         (KJS::JSObject::getPropertyList):
2639         * kjs/object.h:
2640         * kjs/property_map.cpp:
2641         (KJS::PropertyMap::get):
2642         * kjs/property_map.h:
2643         * kjs/scope_chain.cpp:
2644         (KJS::ScopeChain::print):
2645         * kjs/string_object.cpp:
2646         (StringInstance::getPropertyList):
2647         * kjs/string_object.h:
2648         * kjs/ustring.h:
2649         (KJS::UString::Rep::ref):
2650
2651 2006-06-20  Timothy Hatcher  <timothy@apple.com>
2652
2653         Reviewed by Geoff.
2654
2655         Make sure we clear the exception before returning so
2656         that future calls will not fail because of an earlier
2657         exception state. Assert on entry that the WebScriptObject
2658         is working with an ExecState that dose not have an exception. 
2659         Document that evaluateWebScript and callWebScriptMethod return
2660         WebUndefined when an exception is thrown.
2661
2662         * bindings/objc/WebScriptObject.h:
2663         * bindings/objc/WebScriptObject.mm:
2664         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2665         (-[WebScriptObject evaluateWebScript:]):
2666         (-[WebScriptObject setValue:forKey:]):
2667         (-[WebScriptObject valueForKey:]):
2668         (-[WebScriptObject removeWebScriptKey:]):
2669         (-[WebScriptObject webScriptValueAtIndex:]):
2670         (-[WebScriptObject setWebScriptValueAtIndex:value:]):
2671
2672 2006-06-19  Anders Carlsson  <acarlsson@apple.com>
2673
2674         Reviewed by John.
2675
2676         * kjs/interpreter.cpp:
2677         (KJS::TimeoutChecker::pauseTimeoutCheck):
2678         (KJS::TimeoutChecker::resumeTimeoutCheck):
2679         Fix argument order in setitimer calls.
2680
2681 2006-06-18  Anders Carlsson  <acarlsson@apple.com>
2682
2683         Reviewed by Geoff.
2684
2685         * kjs/interpreter.cpp:
2686         (KJS::TimeoutChecker::pauseTimeoutCheck):
2687         Do nothing if the timeout check hasn't been started.
2688         
2689         (KJS::TimeoutChecker::resumeTimeoutCheck):
2690         Do nothing if the timeout check hasn't been started.
2691         Use the right signal handler when unblocking.
2692         
2693         (KJS::Interpreter::handleTimeout):
2694         pause/resume the timeout check around the call to
2695         shouldInterruptScript().
2696         
2697 2006-06-16  Ben Goodger <beng@google.com>
2698         
2699         Reviewed by Maciej
2700
2701         http://bugzilla.opendarwin.org/show_bug.cgi?id=9491
2702         Windows build breaks in interpreter.cpp 
2703
2704         * kjs/interpreter.cpp
2705         (KJS::TimeoutChecker::pauseTimeoutCheck):
2706         (KJS::TimeoutChecker::resumeTimeoutCheck):
2707         Make sure to only assert equality with s_executingInterpreter when it 
2708         is being used (i.e. when HAVE(SYS_TIME_H) == true)
2709
2710 2006-06-17  David Kilzer  <ddkilzer@kilzer.net>
2711
2712         Reviewed by darin.
2713
2714         http://bugzilla.opendarwin.org/show_bug.cgi?id=9477
2715         REGRESSION: fast/dom/replaceChild.html crashes on WebKit ToT in debug build
2716
2717         * kjs/function.cpp:
2718         (KJS::FunctionImp::callAsFunction): Refetch the debugger after executing the function
2719         in case the WebFrame it was running in has since been destroyed.
2720
2721 2006-06-17  David Kilzer  <ddkilzer@kilzer.net>
2722
2723         Reviewed by ggaren.
2724
2725         http://bugzilla.opendarwin.org/show_bug.cgi?id=9476
2726         REGRESSION: Reproducible crash after closing window after viewing
2727         css2.1/t0803-c5501-imrgn-t-00-b-ag.html
2728
2729         * kjs/debugger.cpp:
2730         (Debugger::detach): Call setDebugger(0) for all interpreters removed from
2731         the 'attached to a debugger' list.
2732
2733 2006-06-17  Anders Carlsson  <acarlsson@apple.com>
2734
2735         Reviewed by Maciej and Geoff.
2736
2737         http://bugzilla.opendarwin.org/show_bug.cgi?id=7080
2738         Provide some way to stop a JavaScript infinite loop
2739         
2740         * kjs/completion.h:
2741         (KJS::):
2742         Add Interrupted completion type.
2743         
2744         * kjs/function.cpp:
2745         (KJS::FunctionImp::callAsFunction):
2746         (KJS::GlobalFuncImp::callAsFunction):
2747         Only set the exception on the new ExecState if the current one has had one.
2748         
2749         * kjs/interpreter.cpp:
2750         (KJS::TimeoutChecker::startTimeoutCheck):
2751         (KJS::TimeoutChecker::stopTimeoutCheck):
2752         (KJS::TimeoutChecker::alarmHandler):
2753         (KJS::TimeoutChecker::pauseTimeoutCheck):
2754         (KJS::TimeoutChecker::resumeTimeoutCheck):
2755         New TimeoutChecker class which handles setting Interpreter::m_timedOut flag after a given
2756         period of time. This currently only works on Unix platforms where setitimer and signals are used.
2757         
2758         (KJS::Interpreter::Interpreter):
2759         Initialize new member variables.
2760         
2761         (KJS::Interpreter::~Interpreter):
2762         Destroy the timeout checker.
2763         
2764         (KJS::Interpreter::startTimeoutCheck):
2765         (KJS::Interpreter::stopTimeoutCheck):
2766         (KJS::Interpreter::pauseTimeoutCheck):
2767         (KJS::Interpreter::resumeTimeoutCheck):
2768         Call the timeout checker.
2769         
2770         (KJS::Interpreter::handleTimeout):
2771         Called on timeout. Resets the m_timedOut flag and calls shouldInterruptScript.
2772         
2773         * kjs/interpreter.h:
2774         (KJS::Interpreter::setTimeoutTime):
2775         New function for setting the timeout time.
2776         
2777         (KJS::Interpreter::shouldInterruptScript):
2778         New function. The idea is that this should be overridden by subclasses in order to for example
2779         pop up a dialog asking the user if the script should be interrupted.
2780         
2781         (KJS::Interpreter::checkTimeout):
2782         New function which checks the m_timedOut flag and calls handleTimeout if it's set.
2783         
2784         * kjs/nodes.cpp:
2785         (DoWhileNode::execute):
2786         (WhileNode::execute):
2787         (ForNode::execute):
2788         Call Interpreter::checkTimeout after each iteration of the loop.
2789
2790 2006-06-15  Timothy Hatcher  <timothy@apple.com>
2791
2792         Reviewed by Geoff and Darin.
2793         
2794         Prefer the DWARF debugging symbols format for use in Xcode 2.3.
2795
2796         * JavaScriptCore.xcodeproj/project.pbxproj:
2797
2798 2006-06-14  Geoffrey Garen  <ggaren@apple.com>
2799
2800         Reviewed by Beth.
2801         
2802         - fixed http://bugzilla.opendarwin.org/show_bug.cgi?id=9438
2803         Someone broke ToT: cannot build
2804
2805         * JavaScriptCore.xcodeproj/project.pbxproj:
2806         * bindings/runtime_root.h: Changed "Interpreter.h" to "interpreter.h"
2807
2808 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
2809
2810         build fix
2811         
2812         * bindings/objc/WebScriptObject.mm:
2813         (+[WebScriptObject throwException:]): Restore assignment I accidentally
2814         deleted in previous commit
2815
2816 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
2817
2818         Reviewed by TimO, Maciej.
2819         
2820         - Merged InterpreterImp code into Interpreter, which implements
2821         all interpreter functionality now. This is part of my continuing quest
2822         to create an external notion of JS "execution context" that is unified and simple --
2823         something to replace the mix of Context, ContextImp, ExecState, Interpreter,
2824         InterpreterImp, and JSRun.
2825         
2826         All tests pass. Leaks test has not regressed from its baseline ~207 leaks
2827         with ~3460 leaked nodes.
2828
2829         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
2830         * JavaScriptCore.xcodeproj/project.pbxproj:
2831         * bindings/NP_jsobject.cpp:
2832         * bindings/objc/WebScriptObject.mm:
2833         (+[WebScriptObject throwException:]):
2834         * bindings/runtime_root.cpp:
2835         * bindings/runtime_root.h:
2836         * kjs/Context.cpp:
2837         (KJS::Context::Context):
2838         * kjs/ExecState.cpp: Added.
2839         (KJS::ExecState::lexicalInterpreter):
2840         * kjs/ExecState.h: Added.
2841         (KJS::ExecState::dynamicInterpreter):
2842         * kjs/SavedBuiltins.h: Added.
2843         * kjs/bool_object.cpp:
2844         (BooleanPrototype::BooleanPrototype):
2845         * kjs/collector.cpp:
2846         (KJS::Collector::collect):
2847         (KJS::Collector::numInterpreters):
2848         * kjs/context.h:
2849         * kjs/debugger.cpp:
2850         (Debugger::attach):
2851         (Debugger::detach):
2852         * kjs/function.cpp:
2853         (KJS::FunctionImp::callAsFunction):
2854         (KJS::GlobalFuncImp::callAsFunction):
2855         * kjs/function_object.cpp:
2856         (FunctionObjectImp::construct):
2857         * kjs/internal.cpp:
2858         * kjs/internal.h:
2859         * kjs/interpreter.cpp:
2860         (KJS::interpreterMap):
2861         (KJS::Interpreter::Interpreter):
2862         (KJS::Interpreter::init):
2863         (KJS::Interpreter::~Interpreter):
2864         (KJS::Interpreter::globalObject):
2865         (KJS::Interpreter::initGlobalObject):
2866         (KJS::Interpreter::globalExec):
2867         (KJS::Interpreter::checkSyntax):
2868         (KJS::Interpreter::evaluate):
2869         (KJS::Interpreter::builtinObject):
2870         (KJS::Interpreter::builtinFunction):
2871         (KJS::Interpreter::builtinArray):
2872         (KJS::Interpreter::builtinBoolean):
2873         (KJS::Interpreter::builtinString):
2874         (KJS::Interpreter::builtinNumber):
2875         (KJS::Interpreter::builtinDate):
2876         (KJS::Interpreter::builtinRegExp):
2877         (KJS::Interpreter::builtinError):
2878         (KJS::Interpreter::builtinObjectPrototype):
2879         (KJS::Interpreter::builtinFunctionPrototype):
2880         (KJS::Interpreter::builtinArrayPrototype):
2881         (KJS::Interpreter::builtinBooleanPrototype):
2882         (KJS::Interpreter::builtinStringPrototype):
2883         (KJS::Interpreter::builtinNumberPrototype):
2884         (KJS::Interpreter::builtinDatePrototype):
2885         (KJS::Interpreter::builtinRegExpPrototype):
2886         (KJS::Interpreter::builtinErrorPrototype):
2887         (KJS::Interpreter::builtinEvalError):
2888         (KJS::Interpreter::builtinRangeError):
2889         (KJS::Interpreter::builtinReferenceError):
2890         (KJS::Interpreter::builtinSyntaxError):
2891         (KJS::Interpreter::builtinTypeError):
2892         (KJS::Interpreter::builtinURIError):
2893         (KJS::Interpreter::builtinEvalErrorPrototype):
2894         (KJS::Interpreter::builtinRangeErrorPrototype):
2895         (KJS::Interpreter::builtinReferenceErrorPrototype):
2896         (KJS::Interpreter::builtinSyntaxErrorPrototype):
2897         (KJS::Interpreter::builtinTypeErrorPrototype):
2898         (KJS::Interpreter::builtinURIErrorPrototype):
2899         (KJS::Interpreter::mark):
2900         (KJS::Interpreter::interpreterWithGlobalObject):
2901         (KJS::Interpreter::saveBuiltins):
2902         (KJS::Interpreter::restoreBuiltins):
2903         * kjs/interpreter.h:
2904         (KJS::Interpreter::setCompatMode):
2905         (KJS::Interpreter::compatMode):
2906         (KJS::Interpreter::firstInterpreter):
2907         (KJS::Interpreter::nextInterpreter):
2908         (KJS::Interpreter::prevInterpreter):
2909         (KJS::Interpreter::debugger):
2910         (KJS::Interpreter::setDebugger):
2911         (KJS::Interpreter::setContext):
2912         (KJS::Interpreter::context):
2913         * kjs/nodes.cpp:
2914         (StatementNode::hitStatement):
2915         (RegExpNode::evaluate):
2916         * kjs/protect.h:
2917
2918 2006-06-12  Geoffrey Garen  <ggaren@apple.com>
2919
2920         Reviewed by Maciej.
2921         
2922         - Have *.lut.h files #include lookup.h to eliminate surprising header
2923         include order dependency.
2924
2925         * DerivedSources.make:
2926         * kjs/array_object.cpp:
2927         * kjs/date_object.cpp:
2928         * kjs/date_object.h:
2929         (KJS::DateProtoFunc::):
2930         * kjs/lexer.cpp:
2931         * kjs/math_object.cpp:
2932         * kjs/number_object.cpp:
2933         * kjs/regexp_object.cpp:
2934         * kjs/string_object.cpp:
2935
2936 2006-06-10  Geoffrey Garen  <ggaren@apple.com>
2937
2938         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8515
2939         Linux porting compile bug
2940         
2941         Fix by Mike Emmel, Reviewed by Darin.
2942
2943         * JavaScriptCoreSources.bkl:
2944         * jscore.bkl:
2945         * wtf/Platform.h:
2946
2947 2006-06-09  Geoffrey Garen  <ggaren@apple.com>
2948
2949         Build fix -- I think :).
2950
2951         * JavaScriptCore.xcodeproj/project.pbxproj:
2952         * kjs/context.h:
2953
2954 2006-06-09  Geoffrey Garen  <ggaren@apple.com>
2955
2956         Reviewed by Eric (yay!).
2957         
2958         - Removed Context wrapper for ContextImp, renamed ContextImp to Context,
2959         split Context into its own file -- Context.cpp -- renamed _var to m_var,
2960         change ' *' to '* '.
2961
2962         * JavaScriptCore.xcodeproj/project.pbxproj:
2963         * kjs/Context.cpp: Added.
2964         (KJS::Context::Context):
2965         (KJS::Context::~Context):
2966         (KJS::Context::mark):
2967         * kjs/context.h:
2968         (KJS::Context::scopeChain):
2969         (KJS::Context::variableObject):
2970         (KJS::Context::setVariableObject):
2971         (KJS::Context::thisValue):
2972         (KJS::Context::callingContext):
2973         (KJS::Context::activationObject):
2974         (KJS::Context::currentBody):
2975         (KJS::Context::function):
2976         (KJS::Context::arguments):
2977         (KJS::Context::pushScope):
2978         (KJS::Context::seenLabels):
2979         * kjs/function.cpp:
2980         (KJS::FunctionImp::callAsFunction):
2981         (KJS::FunctionImp::processParameters):
2982         (KJS::FunctionImp::argumentsGetter):
2983         (KJS::GlobalFuncImp::callAsFunction):
2984         * kjs/internal.cpp:
2985         (KJS::InterpreterImp::evaluate):
2986         * kjs/internal.h:
2987         (KJS::InterpreterImp::setContext):
2988         (KJS::InterpreterImp::context):
2989         * kjs/interpreter.cpp:
2990         * kjs/interpreter.h:
2991         (KJS::ExecState::context):
2992         (KJS::ExecState::ExecState):
2993         * kjs/nodes.cpp:
2994         (currentSourceId):
2995         (currentSourceURL):
2996         (ThisNode::evaluate):
2997         (ResolveNode::evaluate):
2998         (FunctionCallResolveNode::evaluate):
2999         (PostfixResolveNode::evaluate):
3000         (DeleteResolveNode::evaluate):
3001         (TypeOfResolveNode::evaluate):
3002         (PrefixResolveNode::evaluate):
3003         (AssignResolveNode::evaluate):
3004         (VarDeclNode::evaluate):
3005         (VarDeclNode::processVarDecls):
3006         (DoWhileNode::execute):
3007         (WhileNode::execute):
3008         (ForNode::execute):
3009         (ForInNode::execute):
3010         (ContinueNode::execute):
3011         (BreakNode::execute):
3012         (ReturnNode::execute):
3013         (WithNode::execute):
3014         (SwitchNode::execute):
3015         (LabelNode::execute):
3016         (TryNode::execute):
3017         (FuncDeclNode::processFuncDecl):
3018         (FuncExprNode::evaluate):
3019
3020 2006-06-07  Geoffrey Garen  <ggaren@apple.com>
3021
3022         Removed API directory I prematurely/accidentally added.
3023
3024         * API: Removed.
3025
3026 2006-06-05  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3027
3028         Reviewed and landed by Geoff.
3029
3030         - fix a regression in ecma_3/String/regress-104375.js
3031
3032         * kjs/string_object.cpp:
3033         (substituteBackreferences): If a 2-digit back reference is out of range,
3034         parse it as a 1-digit reference (followed by the other digit). This matches
3035         Firefox's behavior.
3036
3037 2006-06-05  Geoffrey Garen  <ggaren@apple.com>
3038
3039         Reviewed By Maciej.
3040         Darin already reviewed this change on the branch. See <rdar://problem/4317701>.
3041         
3042         - Fixed <rdar://problem/4291345> PCRE overflow in Safari JavaScriptCore
3043
3044         No test case because there's no behavior change.
3045         
3046         * pcre/pcre_compile.c:
3047         (read_repeat_counts): Check for integer overflow / out of bounds
3048
3049 2006-06-05  Geoffrey Garen  <ggaren@apple.com>
3050
3051         Reviewed by aliu.
3052
3053         - Changed CString length from int to size_t. We sould probably do this
3054         for UString, too. (Darin, if you're reading this: Maciej said so.)
3055         
3056         * kjs/function.cpp:
3057         (KJS::encode):
3058         * kjs/ustring.cpp:
3059         (KJS::CString::CString):
3060         (KJS::operator==):
3061         * kjs/ustring.h:
3062         (KJS::CString::size):
3063
3064 2006-06-04  Geoffrey Garen  <ggaren@apple.com>
3065
3066         Reviewed by Maciej.
3067         
3068         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9304
3069         Minor cleanup in JavaScriptCore
3070
3071         * kjs/value.h: Removed redundant declarations
3072
3073 2006-06-04  Darin Adler  <darin@apple.com>
3074
3075         Reviewed by Anders.
3076
3077         - changed deleteAllValues so it can work on "const" collections
3078           Deleting the values affects the values, not the pointers in the
3079           collection, so it's legitimate to do it to a const collection,
3080           and a case of that actually came up in the XPath code.
3081
3082         * wtf/HashMap.h:
3083         (WTF::deleteAllPairSeconds): Use const iterators.
3084         (WTF::deleteAllValues): Take const HashMap reference as a parameter.
3085         * wtf/HashSet.h:
3086         (WTF::deleteAllValues): Take const HashSet reference as a parameter,
3087         and use const iterators.
3088         * wtf/Vector.h:
3089         (WTF::deleteAllValues): Take const Vector reference as a parameter.
3090
3091         - added more functions that are present in <math.h> on some platforms,
3092           but not on others; moved here from various files in WebCore
3093
3094         * wtf/MathExtras.h:
3095         (isinf): Added.
3096         (isnan): Added.
3097         (lround): Added.
3098         (lroundf): Tweaked.
3099         (round): Added.
3100         (roundf): Tweaked.
3101         (signbit): Added.
3102
3103 2006-06-02  Mitz Pettel  <opendarwin.org@mitzpettel.com>
3104
3105         Reviewed by ggaren.
3106
3107         - http://bugzilla.opendarwin.org/show_bug.cgi?id=9234
3108           Implement $&, $' and $` replacement codes in String.prototype.replace
3109
3110         Test: fast/js/string-replace-3.html
3111
3112         * kjs/string_object.cpp:
3113         (substituteBackreferences): Added support for $& (matched substring),
3114         $` (everything preceding matched substring), $' (everything following
3115         matched substring) and 2-digit back references, and cleaned up a little.
3116
3117 2006-06-02 Adele Peterson  <adele@apple.com>
3118
3119         Reviewed by Darin.
3120
3121         Set incremental linking to no. This seems to fix a build problem I was seeing
3122         where dftables couldn't find a dll. 
3123
3124         * JavaScriptCore.vcproj/dftables/dftables.vcproj:
3125
3126 2006-05-26  Steve Falkenburg  <sfalken@apple.com>
3127
3128         Build fixes/tweaks
3129
3130         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
3131
3132 === JavaScriptCore-521.11 ===
3133
3134 2006-05-24  Geoffrey Garen  <ggaren@apple.com>
3135
3136         Reviewed by mjs.
3137         
3138         - JSC half of fix for <rdar://problem/4557926> TOT REGRESSSION: Crash
3139         occurs when attempting to view image in slideshow mode at
3140         http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute
3141         (KJS::ExecState*) + 312)
3142
3143         On alternate threads, DOMObjects remain in the
3144         ScriptInterpreter's cache because they're not collected. So, they
3145         need an opportunity to mark their children.
3146         
3147         I'm not particularly happy with this solution because it fails to
3148         resolve many outstanding issues with the DOM object cache. Since none
3149         of those issues is a crasher or a serious compatibility concern,
3150         and since the behavior of other browsers is not much to go on in this
3151         case, I've filed <rdar://problem/4561439> about that, and I'm moving on 
3152         with my life.
3153
3154         * JavaScriptCore.xcodeproj/project.pbxproj:
3155         * kjs/collector.cpp:
3156         (KJS::Collector::collect):
3157         * kjs/internal.cpp:
3158         (KJS::InterpreterImp::mark):
3159         * kjs/internal.h:
3160         * kjs/interpreter.cpp:
3161         (KJS::Interpreter::mark):
3162         * kjs/interpreter.h:
3163
3164 === JavaScriptCore-521.10 ===
3165
3166 2006-05-22  Timothy Hatcher  <timothy@apple.com>
3167
3168         Reviewed by Eric, Kevin and Geoff.
3169
3170         Merge open source build fixes. <rdar://problem/4555500>
3171
3172         * kjs/collector.cpp: look at the rsp register in x86_64 
3173         (KJS::Collector::markOtherThreadConservatively):
3174         * wtf/Platform.h: add x86_64 to the platform list
3175
3176 2006-05-19  Anders Carlsson  <acarlsson@apple.com>
3177
3178         Reviewed by Geoff.
3179
3180         http://bugzilla.opendarwin.org/show_bug.cgi?id=8993
3181         Support function declaration in case statements
3182         
3183         * kjs/grammar.y: Get rid of StatementList and use SourceElements instead.
3184         
3185         * kjs/nodes.cpp:
3186         (CaseClauseNode::evalStatements):
3187         (CaseClauseNode::processVarDecls):
3188         (CaseClauseNode::processFuncDecl):
3189         (ClauseListNode::processFuncDecl):
3190         (CaseBlockNode::processFuncDecl):
3191         (SwitchNode::processFuncDecl):
3192         * kjs/nodes.h:
3193         (KJS::CaseClauseNode::CaseClauseNode):
3194         (KJS::ClauseListNode::ClauseListNode):
3195         (KJS::ClauseListNode::getClause):
3196         (KJS::ClauseListNode::getNext):
3197         (KJS::ClauseListNode::releaseNext):
3198         (KJS::SwitchNode::SwitchNode):
3199         Add processFuncDecl for the relevant nodes.        
3200
3201         * kjs/nodes2string.cpp:
3202         (CaseClauseNode::streamTo):
3203         next got renamed to source.
3204
3205 2006-05-17  George Staikos <staikos@kde.org>
3206
3207         Reviewed by Maciej, Alexey, and Eric.
3208
3209         * pcre/pcre_compile.c:
3210         * pcre/pcre_get.c:
3211         * pcre/pcre_exec.c:
3212         * wtf/UnusedParam.h:
3213         Use /**/ in .c files to compile with non-C99 and non-GCC compilers.
3214
3215         * kjs/testkjs.cpp:
3216         Change include to <wtf/HashTraits.h> from "HashTraits.h" to avoid -I
3217
3218         * wtf/unicode/qt4/UnicodeQt4.h:
3219         Use correct parentheses and correct mask for utf-32 support.
3220
3221 2006-05-17  Alexey Proskuryakov  <ap@nypop.com>
3222
3223         Reviewed by Darin.
3224
3225         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8870
3226         Crash typing in Yahoo auto-complete widget.
3227
3228         Test: fast/js/regexp-stack-overflow.html
3229
3230         * pcre/pcre-config.h: Define NO_RECURSE.
3231
3232 2006-05-16  George Staikos <staikos@kde.org>
3233
3234         Reviewed by Maciej.
3235
3236         Fix some warnings and strict compilation errors.
3237
3238         * kjs/nodes.cpp: 
3239         * kjs/value.cpp: 
3240
3241 2006-05-15  Alexey Proskuryakov  <ap@nypop.com>
3242
3243         * make-generated-sources.sh: Changed to be executable and removed
3244         text in the file generated by "svn diff".
3245
3246 2006-05-15  Geoffrey Garen  <ggaren@apple.com>
3247
3248         Reviewed by Maciej.
3249
3250         - Fixed <rdar://problem/4534904> please do not treat "debugger" as
3251         a reserved word while parsing JavaScript (and other ECMA reserved
3252         words) 
3253
3254         AKA 
3255
3256         http://bugzilla.opendarwin.org/show_bug.cgi?id=6179 
3257         We treat "char" as a reserved word in JavaScript and firefox/IE do
3258         not
3259
3260         (1) I unreserved most of the spec's "future reserved words" because 
3261         they're not reserved in IE or FF. (Most, but not all, because IE
3262         somewhat randomly *does* reserve a few of them.)
3263         (2) I made 'debugger' a legitimate statement that acts like an empty
3264         statement because FF and IE support it.
3265         
3266         * kjs/grammar.y:
3267         * kjs/keywords.table:
3268
3269 2006-05-15  Tim Omernick  <timo@apple.com>
3270
3271         Reviewed by John Sullivan.
3272
3273         Part of <rdar://problem/4466508> Add 64-bit support to the Netscape Plugin API
3274
3275         Added to the Netscape Plugin API the concept of "plugin drawing models".  The drawing model
3276         determines the kind of graphics context created by the browser for the plugin, as well as 
3277         the Mac types of various Netscape Plugin API data structures.
3278
3279         There is a drawing model to represent the old QuickDraw-based API.  It is used by default
3280         if QuickDraw is available on the system, unless the plugin specifies another drawing model.
3281
3282         The big change is the addition of the CoreGraphics drawing model.  A plugin may request this
3283         drawing model to obtain access to a CGContextRef for drawing, instead of a QuickDraw CGrafPtr.
3284
3285         * bindings/npapi.h:
3286         Define NP_NO_QUICKDRAW when compiling 64-bit; there is no 64-bit QuickDraw.
3287         Added NPNVpluginDrawingModel, NPNVsupportsQuickDrawBool, and NPNVsupportsCoreGraphicsBool
3288         variables.
3289         Added NPDrawingModel enumeration.  Currently the only drawing models are QuickDraw and
3290         CoreGraphics.
3291         NPRegion's type now depends on the drawing model specified by the plugin.
3292         NP_Port is now only defined when QuickDraw is available.
3293         Added NP_CGContext, which is the type of the NPWindow's "window" member in CoreGraphics mode.
3294
3295 2006-05-13  Kevin M. Ollivier  <kevino@theolliviers.com>
3296
3297         Reviewed by Darin, landed by ap.
3298
3299         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8528
3300           Bakefiles (and generated Makefiles) for wx and gdk ports
3301
3302         * make-generated-sources.sh: 
3303         Added script to configure environment to run DerivedSources.make
3304         
3305         * JavaScriptCoreSources.bkl:
3306         Added JavaScriptCore sources list for Bakefile.
3307         
3308         * jscore.bkl:
3309         Bakefile used to generate JavaScriptCore project files 
3310         (currently only used by wx and gdk ports)
3311
3312 2006-05-09  Steve Falkenburg  <sfalken@apple.com>
3313
3314         Fix Windows build.
3315         Minor fixes to WTF headers.
3316         
3317         Reviewed by kevin.
3318
3319         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Fix include dirs, paths to files. 
3320         * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Fix include dirs.
3321         * wtf/Assertions.h: include Platform.h to get definition for COMPILER()
3322         * wtf/Vector.h: include FastMalloc.h for definition of fastMalloc, fastFree
3323
3324 2006-05-09  Maciej Stachowiak  <mjs@apple.com>
3325
3326         Rubber stamped by Anders.
3327         
3328         - renamed kxmlcore to wtf
3329         
3330         kxmlcore --> wtf
3331         KXMLCore --> WTF
3332         KXC --> WTF
3333
3334         * JavaScriptCore.xcodeproj/project.pbxproj:
3335         * bindings/c/c_instance.cpp:
3336         * bindings/objc/WebScriptObject.mm:
3337         * kjs/JSImmediate.h:
3338         * kjs/Parser.cpp:
3339         * kjs/Parser.h:
3340         * kjs/array_object.cpp:
3341         * kjs/collector.cpp:
3342         (KJS::Collector::registerThread):
3343         * kjs/collector.h:
3344         * kjs/config.h:
3345         * kjs/function.cpp:
3346         (KJS::isStrWhiteSpace):
3347         * kjs/function.h:
3348         * kjs/identifier.cpp:
3349         * kjs/internal.cpp:
3350         * kjs/internal.h:
3351         * kjs/lexer.cpp:
3352         (Lexer::shift):
3353         (Lexer::isWhiteSpace):
3354         (Lexer::isIdentStart):
3355         (Lexer::isIdentPart):
3356         * kjs/lookup.cpp:
3357         * kjs/nodes.cpp:
3358         * kjs/nodes.h:
3359         * kjs/number_object.cpp:
3360         * kjs/object.h:
3361         * kjs/property_map.cpp:
3362         * kjs/property_map.h:
3363         * kjs/string_object.cpp:
3364         (StringProtoFunc::callAsFunction):
3365         * kjs/testkjs.cpp:
3366         (testIsInteger):
3367         * kjs/ustring.cpp:
3368         * kjs/ustring.h:
3369         * kxmlcore: Removed.
3370         * kxmlcore/AlwaysInline.h: Removed.
3371         * kxmlcore/Assertions.cpp: Removed.
3372         * kxmlcore/Assertions.h: Removed.
3373         * kxmlcore/FastMalloc.cpp: Removed.
3374         * kxmlcore/FastMalloc.h: Removed.
3375         * kxmlcore/FastMallocInternal.h: Removed.
3376         * kxmlcore/Forward.h: Removed.
3377         * kxmlcore/HashCountedSet.h: Removed.
3378         * kxmlcore/HashFunctions.h: Removed.
3379         * kxmlcore/HashMap.h: Removed.
3380         * kxmlcore/HashSet.h: Removed.
3381         * kxmlcore/HashTable.cpp: Removed.
3382         * kxmlcore/HashTable.h: Removed.
3383         * kxmlcore/HashTraits.h: Removed.
3384         * kxmlcore/ListRefPtr.h: Removed.
3385         * kxmlcore/Noncopyable.h: Removed.
3386         * kxmlcore/OwnArrayPtr.h: Removed.
3387         * kxmlcore/OwnPtr.h: Removed.
3388         * kxmlcore/PassRefPtr.h: Removed.
3389         * kxmlcore/Platform.h: Removed.
3390         * kxmlcore/RefPtr.h: Removed.
3391         * kxmlcore/TCPageMap.h: Removed.
3392         * kxmlcore/TCSpinLock.h: Removed.
3393         * kxmlcore/TCSystemAlloc.cpp: Removed.
3394         * kxmlcore/TCSystemAlloc.h: Removed.
3395         * kxmlcore/UnusedParam.h: Removed.
3396         * kxmlcore/Vector.h: Removed.
3397         * kxmlcore/VectorTraits.h: Removed.
3398         * kxmlcore/unicode: Removed.
3399         * kxmlcore/unicode/Unicode.h: Removed.
3400         * kxmlcore/unicode/UnicodeCategory.h: Removed.
3401         * kxmlcore/unicode/icu: Removed.
3402         * kxmlcore/unicode/icu/UnicodeIcu.h: Removed.
3403         * kxmlcore/unicode/posix: Removed.
3404         * kxmlcore/unicode/qt3: Removed.
3405         * kxmlcore/unicode/qt4: Removed.
3406         * kxmlcore/unicode/qt4/UnicodeQt4.h: Removed.
3407         * pcre/pcre_get.c:
3408         * wtf: Added.
3409         * wtf/Assertions.cpp:
3410         * wtf/Assertions.h:
3411         * wtf/FastMalloc.cpp:
3412         (WTF::TCMalloc_ThreadCache::Scavenge):
3413         (WTF::do_malloc):
3414         (WTF::do_free):
3415         (WTF::TCMallocGuard::TCMallocGuard):
3416         (WTF::malloc):
3417         (WTF::free):
3418         (WTF::calloc):
3419         (WTF::cfree):
3420         (WTF::realloc):
3421         * wtf/FastMalloc.h:
3422         * wtf/FastMallocInternal.h:
3423         * wtf/Forward.h:
3424         * wtf/HashCountedSet.h:
3425         * wtf/HashFunctions.h:
3426         * wtf/HashMap.h:
3427         * wtf/HashSet.h:
3428         * wtf/HashTable.cpp:
3429         * wtf/HashTable.h:
3430         * wtf/HashTraits.h:
3431         * wtf/ListRefPtr.h:
3432         * wtf/Noncopyable.h:
3433         * wtf/OwnArrayPtr.h:
3434         * wtf/OwnPtr.h:
3435         * wtf/PassRefPtr.h:
3436         * wtf/RefPtr.h:
3437         * wtf/TCSystemAlloc.cpp:
3438         (TCMalloc_SystemAlloc):
3439         * wtf/Vector.h:
3440         * wtf/VectorTraits.h:
3441         * wtf/unicode/UnicodeCategory.h:
3442         * wtf/unicode/icu/UnicodeIcu.h:
3443
3444 2006-05-08  Timothy Hatcher  <timothy@apple.com>
3445
3446         Reviewed by Tim O.
3447
3448         * bindings/npapi.h: do not define #pragma options align=mac68k if we are 64-bit
3449
3450 2006-05-07  Darin Adler  <darin@apple.com>
3451
3452         Reviewed and landed by Maciej.
3453
3454         - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8765
3455         Random crashes on TOT since the form state change
3456         
3457         I haven't figured out how to construct a test for this, but this does seem to fix the
3458         problem; Mitz mentioned that a double-destroy was occurring in these functions.
3459         
3460         * kxmlcore/HashMap.h: (KXMLCore::HashMap::remove): Use RefCounter::deref instead of calling
3461         ~ValueType, because ~ValueType often results in a double-destroy, since the HashTable also
3462         destroys the element based on the storage type. The RefCounter template correctly does work
3463         only in cases where ValueType and ValueStorageType differ and this class is what's used
3464         elsewhere for the same purpose; I somehow missed this case when optimizing HashMap.
3465         * kxmlcore/HashSet.h: (KXMLCore::HashSet::remove): Ditto.
3466         
3467 2006-05-05  Darin Adler  <darin@apple.com>
3468
3469         - http://bugzilla.opendarwin.org/show_bug.cgi?id=8722
3470           IE compatibility fix in date parsing
3471
3472         * kjs/date_object.cpp: (KJS::parseDate): Merged change that George Staikos provided
3473         from KDE 3.4.3 branch that allows day values of 0 and values that are > 1000.
3474
3475 2006-05-04  Anders Carlsson  <andersca@mac.com>
3476
3477         Reviewed by Maciej.
3478
3479         http://bugzilla.opendarwin.org/show_bug.cgi?id=8734
3480         Would like a Vector::append that takes another Vector
3481         
3482         * kxmlcore/Vector.h:
3483         (KXMLCore::::append):
3484         New function that takes another array.
3485
3486 2006-05-02  Steve Falkenburg  <sfalken@apple.com>
3487
3488         Reviewed by eric.
3489
3490         * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: set NDEBUG for release build
3491         * kxmlcore/FastMalloc.cpp: Prevent USE_SYSTEM_MALLOC from being defined twice
3492
3493 2006-05-02  Anders Carlsson  <andersca@mac.com>
3494
3495         Reviewed by Maciej.
3496
3497         * kxmlcore/HashMap.h:
3498         (KXMLCore::::operator):
3499         Return *this
3500
3501 2006-05-01  Tim Omernick  <timo@apple.com>
3502
3503         Reviewed by Tim Hatcher.
3504
3505         <rdar://problem/4476875> Support printing for embedded Netscape plugins
3506
3507         * bindings/npapi.h:
3508         Fixed struct alignment problem in our npapi.h.  Structs must be 68k-aligned on both pre-Mac OS X
3509         and Mac OS X systems, as this is what plugins expect.
3510
3511 2006-05-01  Timothy Hatcher  <timothy@apple.com>
3512
3513         Reviewed by Maciej.
3514         
3515         <rdar://problem/4308243> 8F36 Regression: crash in malloc_consolidate if you use a .PAC file
3516
3517         The original fix missed the oversized cell case. Added a test for "currentThreadIsMainThread || 
3518         imp->m_destructorIsThreadSafe" where we collect oversized cells.
3519
3520         We don't have a way to test PAC files yet, so there's no test attached.
3521
3522         * kjs/collector.cpp:
3523         (KJS::Collector::collect): test the thread when we collect oversized cells
3524
3525 2006-05-01  Tim Omernick  <timo@apple.com>
3526
3527         Reviewed by Adele.
3528
3529         <rdar://problem/4526114> REGRESSION (two days ago): LOG() just prints @ for NSObject substitutions
3530
3531         * kxmlcore/Assertions.cpp:
3532         Changed sense of strstr("%@") check.  I already made the same fix to the WebBrowser assertions.
3533
3534 2006-04-28  Steve Falkenburg  <sfalken@apple.com>
3535
3536         Reviewed by kdecker
3537         
3538         Actually apply the change that was reviewed insted of checking it in with an #if 0 (oops).
3539
3540         * kjs/testkjs.cpp:
3541         (main): Suppress C runtime alerts
3542
3543 2006-04-28  Steve Falkenburg  <sfalken@apple.com>
3544
3545         Reviewed&nb