Reviewed by Darin
[WebKit-https.git] / JavaScriptCore / ChangeLog
1 === Safari-178 ===
2
3 === Safari-177 ===
4
5 === Safari-176 ===
6
7 2004-12-17  Maciej Stachowiak  <mjs@apple.com>
8
9         Reviewed by Kevin.
10
11         <rdar://problem/3926869> Opening caches window after running PLT causes crash
12         
13         * kjs/protected_values.cpp:
14         (KJS::ProtectedValues::getProtectCount): Don't include simple numbers in
15         the protected value table.
16         (KJS::ProtectedValues::increaseProtectCount): Ditto.
17         (KJS::ProtectedValues::decreaseProtectCount): Ditto.
18
19 2004-12-16  Darin Adler  <darin@apple.com>
20
21         Reviewed by Maciej.
22
23         - fixed <rdar://problem/3920764> Unimplemented String methods toLocaleLowerCase and toLocaleUpperCase
24
25         * kjs/string_object.h: Added toLocaleLowerCase and toLocaleUpperCase.
26         * kjs/string_object.cpp: (StringProtoFuncImp::call): Made locale versions be synonmyms for the
27         non-locale-specific versions.
28         * kjs/string_object.lut.h: Regenerated.
29
30 2004-12-14  Richard Williamson   <rjw@apple.com>
31
32         Pass URL of plugin view when call into JNI.
33
34         Reviewed by Chris.
35
36         * bindings/jni/jni_objc.mm:
37         (KJS::Bindings::dispatchJNICall):
38
39 2004-12-13  Richard Williamson   <rjw@apple.com>
40
41         Fixed <rdar://problem/3827799> repro. crash with IBM Rational ClearCase Web under Safari (Java/LiveConnect-related)
42
43         Add support for calling static Java methods from JavaScript.
44
45         Reviewed by Maciej.
46
47         * bindings/jni/jni_instance.cpp:
48         (JavaInstance::invokeMethod):
49         * bindings/jni/jni_runtime.cpp:
50         (JavaMethod::JavaMethod):
51         * bindings/jni/jni_runtime.h:
52         (KJS::Bindings::JavaMethod::isStatic):
53         * bindings/jni/jni_utility.cpp:
54         (callJNIStaticMethod):
55         (KJS::Bindings::callJNIBooleanMethod):
56         (KJS::Bindings::callJNIStaticBooleanMethod):
57         * bindings/jni/jni_utility.h:
58
59 2004-12-13  Richard Williamson   <rjw@apple.com>
60
61         Fixed <rdar://problem/3887767> LiveConnect doesn't propagate Java exceptions back to JavaScript (prevents security suite from running)
62
63         Reviewed by John.
64
65         * bindings/jni/jni_instance.cpp:
66         (JavaInstance::invokeMethod):
67         * bindings/jni/jni_objc.mm:
68         (KJS::Bindings::dispatchJNICall):
69         * bindings/jni/jni_runtime.h:
70         * bindings/jni/jni_utility.h:
71
72 === Safari-175 ===
73
74 2004-12-07  Maciej Stachowiak  <mjs@apple.com>
75
76         Reviewed by Darin.
77
78         <rdar://problem/3908017> REGRESSION (172-173): assertion in ObjectImp::construct trying to create JS error (24hourfitness.com)
79
80         The fix was to implement copy constructor and assignment operator,
81         the ones that worked on the base class did not replace the
82         defaults apparently!
83         
84         * kjs/protect.h:
85         (KJS::ProtectedValue::ProtectedValue):
86         (KJS::ProtectedValue::operator=):
87         (KJS::ProtectedObject::ProtectedObject):
88         (KJS::ProtectedObject::operator=):
89         
90         Also fixed a bug in the GC test mode that compares the results of
91         the old collector and the new collector.
92
93         * kjs/value.cpp:
94         (ValueImp::mark):
95
96 === Safari-173 ===
97
98 2004-11-23  Richard Williamson   <rjw@apple.com>
99
100         Fixed <rdar://problem/3890385> field and method cache incorrectly capped (c bindings)
101
102         Reviewed by Ken.
103
104         * bindings/c/c_class.cpp:
105         (CClass::_commonInit):
106
107 2004-11-21  Maciej Stachowiak  <mjs@apple.com>
108
109         Reviewed by Ken.
110
111         <rdar://problem/3889696> Enable conservative garbage collection for JavaScript
112         
113         * kjs/collector.cpp:
114         (KJS::Collector::Thread::Thread):
115         (KJS::destroyRegisteredThread):
116         (KJS::initializeRegisteredThreadKey):
117         (KJS::Collector::registerThread):
118         (KJS::Collector::markStackObjectsConservatively):
119         (KJS::Collector::markCurrentThreadConservatively):
120         (KJS::Collector::markOtherThreadConservatively):
121         * kjs/collector.h:
122         * kjs/internal.cpp:
123         (lockInterpreter):
124         * kjs/value.h:
125
126 === Safari-172 ===
127
128 2004-11-15  Richard Williamson   <rjw@apple.com>
129
130         Fixed <rdar://problem/3880561> Default string value of ObjC object in JS should be [obj description].
131
132         Reviewed by Hyatt.
133
134         * bindings/objc/objc_instance.mm:
135         (ObjcInstance::stringValue):
136         * bindings/objc/objc_utility.h:
137         * bindings/objc/objc_utility.mm:
138         (KJS::Bindings::convertNSStringToString):
139         (KJS::Bindings::convertObjcValueToValue):
140
141 === Safari-171 ===
142
143 2004-11-09  Chris Blumenberg  <cblu@apple.com>
144
145         Fixed: <rdar://problem/3872724> soft link against JavaVM to save ~2MB RSHRD
146
147         Reviewed by rjw.
148
149         * ChangeLog:
150         * JavaScriptCore.pbproj/project.pbxproj: don't link against JavaVM
151         * bindings/softlinking.c: Added.
152         (loadFramework): new
153         (getFunctionPointer): new
154         (JNI_GetCreatedJavaVMs): load JavaVM if not already loaded, get _JNI_GetCreatedJavaVMs symbol if we don't already have it, call JNI_GetCreatedJavaVMs
155
156 === Safari-170 ===
157
158 2004-11-04  Darin Adler  <darin@apple.com>
159
160         Reviewed by Ken.
161
162         - fixed <rdar://problem/3865365> since -[WebScriptObject dealloc] does not call [super dealloc], the build will fail due to a warning
163         - fixed behavior so that [[WebScriptObject alloc] initWithCoder:] doesn't leak WebUndefined instances
164           and incidentally so that [[WebScriptObject alloc] init] returns the single shared instance rather
165           than allocating a new one
166
167         * bindings/objc/WebScriptObject.mm: Removed some stray semicolons.
168         (+[WebUndefined allocWithZone:]): Made this the common bottleneck that returns the single instance
169         of WebUndefined, since it's the single method that normally allocates new instances. Calls super to
170         actually allocate only the very first time it's called.
171         (-[WebUndefined initWithCoder:]): Simplified to just return self (no reason to re-lookup the single
172         shared instance since there can be only one).
173         (-[WebUndefined copyWithZone:]): Ditto.
174         (-[WebUndefined retain]): Ditto.
175         (-[WebUndefined retainCount]): Use UINT_MAX constant here (matches usage in NSObject.m for retain count
176         of class).
177         (-[WebUndefined autorelease]): Simplified to just return self (see above).
178         (-[WebUndefined copy]): No need to override this since it just turns around and calls copyWithZone:.
179         (-[WebUndefined dealloc]): Added an assertion since this method should never be called. Also added
180         a call to [super dealloc] after return; to make the new -Wdealloc-check compiler happy (fixing the
181         bug mentioned above).
182         (+[WebUndefined undefined]): Reimplemented; calls allocWithZone:NULL to get to the shared instance.
183         No need to call init, since that's a no-op for this class.
184
185 2004-11-03  David Harrison  <harrison@apple.com>
186
187         Reviewed by Darin.
188         
189         Eliminate the use of a marker file to determine how to build.
190
191         * .cvsignore:
192         * Makefile.am:
193
194 2004-11-01  Richard Williamson   <rjw@apple.com>
195
196         Fixed <rdar://problem/3861469> Latest Real player crashes Safari on some sites.
197
198         Reviewed by Ken.
199
200         * bindings/c/c_instance.cpp:
201         (CInstance::invokeMethod):
202         (CInstance::invokeDefaultMethod):
203         Initialize out parameters to void type.
204
205         * bindings/c/c_runtime.cpp:
206         (CField::valueFromInstance):
207         (CField::setValueToInstance):
208         Initialize out parameters to void type.
209         Also added additional checks to protect against classes that 
210         don't implement all functions.
211
212 2004-11-01  Richard Williamson   <rjw@apple.com>
213
214         Fixed <rdar://problem/3861257> WebUndefined should be returned for undefined values
215
216         Reviewed by John.
217
218         * ChangeLog:
219         * bindings/objc/WebScriptObject.mm:
220         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
221         Added additional conversion Undefined -> WebUndefined.
222         * bindings/objc/objc_utility.mm:
223         (KJS::Bindings::convertObjcValueToValue):
224         Added additional conversion WebUndefined -> Undefined.
225
226 2004-11-01  Darin Adler  <darin@apple.com>
227
228         - fixed <rdar://problem/3855573> Remove reference to "WebScriptMethods" from WebScriptObject.h comments
229
230         * bindings/objc/WebScriptObject.h: Removed unneeded #ifdef protection for multiple includes (since
231         this is an Objective-C header and we use #import for those). Fixed comments as requested in the bug
232         report to match the contents of the file.
233
234 === Safari-169 ===
235
236 === Safari-168 ===
237
238 2004-10-22  Ken Kocienda  <kocienda@apple.com>
239
240         Reviewed by me
241
242         * JavaScriptCore.pbproj/project.pbxproj:  
243         Add GCC_ENABLE_OBJC_GC and GCC_FAST_OBJC_DISPATCH flags.
244
245 === Safari-167 ===
246
247 2004-10-13  Richard Williamson   <rjw@apple.com>
248
249         Moved boolean checks prior to NSNumber checks.  booleans are
250         NSNumbers.
251
252         Follow on to <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number.
253
254         Reviewed by John.
255
256         * bindings/objc/objc_utility.mm:
257         (KJS::Bindings::convertObjcValueToValue):
258
259 2004-10-12  Richard Williamson   <rjw@apple.com>
260
261         Fixed access to DOM object via WebScriptObject API.
262         The execution context for DOM objects wasn't being found.       
263         <rdar://problem/3831372> The valueForKey method for @"offsetLeft" on a paragraph element causes a crash.
264
265         Reviewed by Chris.
266
267         * bindings/objc/WebScriptObject.mm:
268         (_didExecute):
269         (-[WebScriptObject KJS::Bindings::]):
270         (-[WebScriptObject callWebScriptMethod:withArguments:]):
271         (-[WebScriptObject evaluateWebScript:]):
272         (-[WebScriptObject setValue:forKey:]):
273         (-[WebScriptObject valueForKey:]):
274         (-[WebScriptObject stringRepresentation]):
275         * bindings/objc/WebScriptObjectPrivate.h:
276
277 2004-10-09  Darin Adler  <darin@apple.com>
278
279         Reviewed by Kevin.
280
281         - fixed <rdar://problem/3804661> REGRESSION: JavaScriptCore framework now has two init routines
282
283         * bindings/NP_jsobject.cpp: Fixed unnecessarily-complex globals set up that was
284         creating an init routine.
285
286         * kjs/ustring.cpp: Changed around the UString::Rep::empty construction to not
287         require a global constructor that creates an init routine.
288
289 2004-10-09  Darin Adler  <darin@apple.com>
290
291         Reviewed by Kevin.
292
293         - fixed <rdar://problem/3822618> REGRESSION (164-165): expedia.com's popup help doesn't work
294
295         * kjs/reference.cpp: (Reference::putValue): Change so that references not found in any object
296         work with the window object of the page the function is in, not the page of the caller. This
297         is what all other browsers do. This code was hidden before by the "everything is defined on
298         window object" hack in WebCore.
299
300 2004-10-07  Richard Williamson   <rjw@apple.com>
301
302         Added simple JavaScript call tracing.  Very useful for
303         debugging complex pages.
304
305         Tracing is only available in development builds and is
306         enabled by:
307
308         (gdb) set traceJavaScript = 1
309
310         or programatically
311
312         setTraceJavaScript(true)
313
314         Function, args, and return values are printed to console.  Very
315         verbose.
316
317         Reviewed by Ken.
318
319         * kjs/function_object.cpp:
320         (FunctionProtoFuncImp::call):
321         * kjs/object.cpp:
322         (KJS::Object::call):
323
324 === Safari-166 ===
325
326 2004-10-05  Richard Williamson   <rjw@apple.com>
327
328         Fixed <rdar://problem/3819234> NPN_SetException (and throwException:) isn't implemented
329
330         Reviewed by Chris.
331
332         * bindings/NP_jsobject.cpp:
333         (_NPN_SetException):
334         * bindings/npruntime.cpp:
335         (_NPN_SetExceptionWithUTF8):
336         * bindings/objc/WebScriptObject.mm:
337         (+[WebScriptObject throwException:]):
338         * kjs/internal.h:
339         (KJS::InterpreterImp::context):
340
341 2004-10-05  Richard Williamson   <rjw@apple.com>
342
343         Fixed <rdar://problem/3821515> binding layer needs to convert NSNumber-bools to js type boolean not number
344
345         Reviewed by Ken.
346
347         * bindings/objc/objc_utility.mm:
348         (KJS::Bindings::convertObjcValueToValue):
349
350 2004-10-04  Darin Adler  <darin@apple.com>
351
352         Reviewed by Ken.
353
354         - rolled in a fix the KDE folks did for the operations that generate HTML fragments
355
356         * kjs/string_object.cpp: (StringProtoFuncImp::call): Added quote marks to generated HTML.
357
358         - rolled out an old workaround we don't need any more
359
360         * JavaScriptCore.pbproj/project.pbxproj: Remove -Wno-long-double because the <math.h> issue that
361         required it is no longer there.
362
363 2004-09-30  Richard Williamson  <rjw@apple.com>
364
365         Fixed <rdar://problem/3821215> NPN hasMethod and hasProperty functions should take NPObjects, not NPClass
366
367         Reviewed by Chris.
368
369         * bindings/NP_jsobject.cpp:
370         (_NPN_GetProperty):
371         (_NPN_HasProperty):
372         (_NPN_HasMethod):
373         * bindings/c/c_class.cpp:
374         (CClass::methodsNamed):
375         (CClass::fieldNamed):
376         * bindings/c/c_class.h:
377         * bindings/c/c_instance.cpp:
378         (CInstance::invokeMethod):
379         * bindings/jni/jni_class.cpp:
380         (JavaClass::methodsNamed):
381         * bindings/jni/jni_class.h:
382         * bindings/npruntime.h:
383         * bindings/objc/objc_class.h:
384         * bindings/objc/objc_class.mm:
385         (ObjcClass::methodsNamed):
386         * bindings/runtime.h:
387         * bindings/runtime_object.cpp:
388         (RuntimeObjectImp::get):
389         (RuntimeObjectImp::hasProperty):
390
391 2004-09-29  Chris Blumenberg  <cblu@apple.com>
392
393         Prepended underscores to NPN methods so that when the QT plug-in loads these symbols, it uses the non-underscore versions in WebKit. Without this, the QT plug-in was failing to load when launching Safari from the command-line.
394
395         Reviewed by rjw.
396
397         * JavaScriptCore.pbproj/project.pbxproj:
398         * bindings/NP_jsobject.cpp:
399         (_NPN_CreateScriptObject):
400         (_NPN_InvokeDefault):
401         (_NPN_Invoke):
402         (_NPN_Evaluate):
403         (_NPN_GetProperty):
404         (_NPN_SetProperty):
405         (_NPN_RemoveProperty):
406         (_NPN_HasProperty):
407         (_NPN_HasMethod):
408         * bindings/c/c_class.cpp:
409         (CClass::methodsNamed):
410         (CClass::fieldNamed):
411         * bindings/c/c_instance.cpp:
412         (CInstance::CInstance):
413         (CInstance::~CInstance):
414         (CInstance::operator=):
415         (CInstance::invokeMethod):
416         (CInstance::invokeDefaultMethod):
417         * bindings/c/c_runtime.cpp:
418         * bindings/c/c_runtime.h:
419         (KJS::Bindings::CField::name):
420         (KJS::Bindings::CMethod::name):
421         * bindings/npruntime.cpp:
422         (_NPN_GetStringIdentifier):
423         (_NPN_GetStringIdentifiers):
424         (_NPN_GetIntIdentifier):
425         (_NPN_IdentifierIsString):
426         (_NPN_UTF8FromIdentifier):
427         (_NPN_IntFromIdentifier):
428         (NPN_InitializeVariantWithObject):
429         (_NPN_ReleaseVariantValue):
430         (_NPN_CreateObject):
431         (_NPN_RetainObject):
432         (_NPN_ReleaseObject):
433         (_NPN_SetExceptionWithUTF8):
434         (_NPN_SetException):
435
436 2004-09-26  Darin Adler  <darin@apple.com>
437
438         * kjs/string_object.cpp: (StringProtoFuncImp::call): Remove strange use of high() and
439         low() to get Unicode value of character, and just use unicode().
440
441 2004-09-26  Darin Adler  <darin@apple.com>
442
443         - refine charAt/charCodeAt fix slightly
444
445         * kjs/string_object.cpp: (StringProtoFuncImp::call): Treat undefined the same was as an
446         omitted parameter, as we do everywhere else, and as other browsers do here.
447
448 2004-09-26  Darin Adler  <darin@apple.com>
449
450         Reviewed by Kevin.
451
452         - fixed <rdar://problem/3816097> REGRESSION: mailblocks, and presumably many other pages, failing because variable not found
453
454         * kjs/internal.cpp: (InterpreterImp::evaluate): Process variable declarations before executing
455         the program. We were doing this properly for functions, but not entire programs.
456
457         - fixed <rdar://problem/3814706> REGRESSION: text fields in mailblocks wizards do not accept keystrokes due to use of charCodeAt()
458
459         * kjs/string_object.cpp: (StringProtoFuncImp::call): Changed the implementation of charAt
460         and charCodeAt to treat a missing parameter as an index of 0, rather than an invalid index.
461
462         * tests/mozilla/expected.html: Update for two tests that now pass with these changes.
463
464 === Safari-165 ===
465
466 === Safari-164 ===
467
468 2004-09-14  Richard Williamson   <rjw@apple.com>
469
470         1.  Add class parameter to object allocation function.  This is somewhat redundant, given that
471         the allocation function is in the class function vector, but people wanted to use the same
472         allocation function for different classes.
473         
474         2.  Renamed NPN_Class to NPN_Invoke to match the name in the function vector.
475         
476         3.  Add support for a default function on an object.  This is a feature that ActiveX supports,
477         and will allow JavaScript code to be written that will look exactly the same for both ActiveX
478         plugins and Netscape or WebKit plugins.  There are implementations included for the 'C' and
479         'Objective-C' bindings.
480         
481         There bugs are covered by
482         
483         <rdar://problem/3776343> Support for default functions in the JavaScript bindings
484         <rdar://problem/3779186> NPN_Call needs to be renamed to NPN_Invoke
485         <rdar://problem/3674754> Need to implement latest npruntime.h
486
487         Reviewed by John.
488
489         * bindings/NP_jsobject.cpp:
490         (jsAllocate):
491         (NPN_InvokeDefault):
492         (NPN_Invoke):
493         * bindings/c/c_class.cpp:
494         * bindings/c/c_instance.cpp:
495         (CInstance::CInstance):
496         (CInstance::operator=):
497         (CInstance::invokeMethod):
498         (CInstance::invokeDefaultMethod):
499         * bindings/c/c_instance.h:
500         * bindings/c/c_runtime.cpp:
501         * bindings/c/c_runtime.h:
502         * bindings/jni/jni_instance.cpp:
503         (JavaInstance::invokeDefaultMethod):
504         * bindings/jni/jni_instance.h:
505         * bindings/npruntime.cpp:
506         (NPN_CreateObject):
507         * bindings/npruntime.h:
508         * bindings/objc/WebScriptObject.h:
509         * bindings/objc/objc_class.mm:
510         (ObjcClass::fallbackObject):
511         * bindings/objc/objc_instance.h:
512         * bindings/objc/objc_instance.mm:
513         (ObjcInstance::invokeDefaultMethod):
514         * bindings/objc/objc_runtime.h:
515         * bindings/objc/objc_runtime.mm:
516         (ObjcFallbackObjectImp::ObjcFallbackObjectImp):
517         (ObjcFallbackObjectImp::get):
518         (ObjcFallbackObjectImp::put):
519         (ObjcFallbackObjectImp::canPut):
520         (ObjcFallbackObjectImp::implementsCall):
521         (ObjcFallbackObjectImp::call):
522         (ObjcFallbackObjectImp::hasProperty):
523         (ObjcFallbackObjectImp::deleteProperty):
524         (ObjcFallbackObjectImp::defaultValue):
525         * bindings/runtime.h:
526         (KJS::Bindings::Class::fallbackObject):
527         (KJS::Bindings::Instance::getValueOfUndefinedField):
528         (KJS::Bindings::Instance::setValueOfUndefinedField):
529         (KJS::Bindings::Instance::valueOf):
530         * bindings/runtime_object.cpp:
531         (RuntimeObjectImp::implementsCall):
532         (RuntimeObjectImp::call):
533         * bindings/runtime_object.h:
534
535 2004-09-13  Maciej Stachowiak  <mjs@apple.com>
536
537         Reviewed by Darin.
538
539         <rdar://problem/3794735> Gmail- sending a very long message with Safari is so slow it seems like a hang
540         
541         * kjs/string_object.cpp:
542         (StringProtoFuncImp::call): Replaced implementation of replace()
543         method with function below...
544         (replace): In order to avoid excessive allocation and copying,
545         figure out the ranges of the original string and replacement
546         strings to be assembled, instead of constantly creating new
547         strings at each substitution. The old behavior is basically O(N^2)
548         for a global replace on a pattern that matches many places in the
549         string.
550         (regExpIsGlobal): Helper function for the above.
551         (expandSourceRanges): ditto
552         (pushSourceRange): ditto
553         (expandReplacements): ditto
554         (pushReplacement): ditto
555         * kjs/ustring.cpp:
556         (KJS::UString::spliceSubstringsWithSeparators): New method that
557         pieces together substring ranges of this string together with
558         specified separators, all at one go.
559         * kjs/ustring.h:
560         (KJS::UString::Range::Range): Added new helper class to represent
561         substring choices.
562
563 2004-09-14  Maciej Stachowiak  <mjs@apple.com>
564
565         Reviewed by Darin.
566
567         - fixed <rdar://problem/3800315> encode-URI-test layout test is failing
568         
569         * kjs/function.cpp:
570         (KJS::GlobalFuncImp::call): Make sure to escape null
571         characters. This is a bug in the new code that made part of the
572         test fail.
573
574 2004-09-13  Darin Adler  <darin@apple.com>
575
576         Reviewed by Kevin and Maciej.
577
578         - new function to support fix for DIG bug in WebCore
579
580         * kjs/scope_chain.h: Added new push function that pushes another entire scope chain.
581         * kjs/scope_chain.cpp: (KJS::ScopeChain::push): Ditto.
582
583 2004-09-12  Darin Adler  <darin@apple.com>
584
585         * tests/mozilla/expected.html: Updated test results for 3 more tests that pass with the new version
586         of escape and unescape.
587
588 2004-09-12  Darin Adler  <darin@apple.com>
589
590         Reviewed by Maciej.
591
592         - fixed <rdar://problem/3798209> any non-ASCII characters are garbled in the result of toLocaleString
593
594         * kjs/date_object.cpp:
595         (formatLocaleDate): Replaced two old functions that used LongDateTime with this one new function that
596         uses CFDateFormatter.
597         (DateProtoFuncImp::call): Call the new formatLocaleDate instead of both formatLocaleDate and formatLocaleTime.
598
599 2004-09-09  Maciej Stachowiak  <mjs@apple.com>
600
601         Reviewed by Richard.
602
603         <rdar://problem/3493140> REGRESSION (85-100): cedille displays %-escaped in JavaScript message at hotmail.com
604
605         * kjs/function.cpp:
606         (KJS::GlobalFuncImp::call): Replace our escape() and unescape() implementations with
607         ones from KDE KJS, which have the proper latin-1 behavior to match Win IE.
608         * kjs/lexer.cpp:
609         (Lexer::isHexDigit): Made static and non-const.
610         * kjs/lexer.h:
611
612 === Safari-163 ===
613
614 2004-09-06  Darin Adler  <darin@apple.com>
615
616         * JavaScriptCore.pbproj/project.pbxproj: Bump MACOSX_DEPLOYMENT_TARGET to 10.3.
617
618 === Safari-162 ===
619
620 2004-09-01  Richard Williamson   <rjw@apple.com>
621
622         Add pid to exception messages (to help debug dashboard clients).
623
624         Reviewed by Chris.
625
626         * kjs/interpreter.cpp:
627         (Interpreter::evaluate):
628
629 === Safari-161 ===
630
631 2004-08-20  Richard Williamson   <rjw@apple.com>
632
633         Implemented new JNI abstraction.  We no longer invoke Java methods
634         directly with JNI, rather we call into the plugin.  This allows the
635         plugin to dispatch the call to the appropriate VM thread.  This
636         change should (will?) fix a whole class of threading related problems with
637         the Java VM.
638
639         Reviewed by Hyatt.
640
641         * JavaScriptCore.pbproj/project.pbxproj:
642         * bindings/c/c_instance.h:
643         (KJS::Bindings::CInstance::setExecutionContext):
644         (KJS::Bindings::CInstance::executionContext):
645         * bindings/jni/jni_instance.cpp:
646         (JavaInstance::JavaInstance):
647         (JavaInstance::invokeMethod):
648         (JavaInstance::setExecutionContext):
649         (JavaInstance::executionContext):
650         * bindings/jni/jni_instance.h:
651         * bindings/jni/jni_jsobject.cpp:
652         (JSObject::convertJObjectToValue):
653         * bindings/jni/jni_runtime.cpp:
654         (JavaField::JavaField):
655         (JavaArray::convertJObjectToArray):
656         (JavaField::valueFromInstance):
657         (JavaArray::JavaArray):
658         (JavaArray::valueAt):
659         * bindings/jni/jni_runtime.h:
660         (KJS::Bindings::JavaArray::operator=):
661         (KJS::Bindings::JavaArray::executionContext):
662         * bindings/jni/jni_utility.h:
663         * bindings/objc/objc_instance.h:
664         (KJS::Bindings::ObjcInstance::setExecutionContext):
665         (KJS::Bindings::ObjcInstance::executionContext):
666         * bindings/runtime.cpp:
667         (Instance::createBindingForLanguageInstance):
668         * bindings/runtime.h:
669         * bindings/runtime_root.h:
670         (KJS::Bindings::RootObject::nativeHandle):
671
672 === Safari-158 ===
673
674 2004-08-19  Vicki Murley  <vicki@apple.com>
675
676         Reviewed by John.
677
678         * kjs/property_map.cpp:
679         (KJS::PropertyMap::put): initialize deletedElementIndex to zero, to make the compiler happy
680
681 2004-08-17  Darin Adler  <darin@apple.com>
682
683         Reviewed by Adele.
684
685         - fixed <rdar://problem/3746676> SAP WebDynpro app hangs inside JavaScript property map hash table code (deleted sentinel problem)
686
687         * kjs/property_map.h: Added some private functions.
688         * kjs/property_map.cpp:
689         (KJS::PropertyMap::clear): Set sentinelCount to 0.
690         (KJS::PropertyMap::put): Complete search for the element before choosing to use the deleted-element sentinel.
691         Also keep sentinel count up to date when we destroy a sentinel by overwriting with a new added element.
692         (KJS::PropertyMap::expand): Added. Calls rehash with a size 2x the old size, or 16.
693         (KJS::PropertyMap::rehash): Added. Refactored the rehash code into a separate function.
694         (KJS::PropertyMap::remove): Add one to sentinelCount, and rehash if 1/4 or more of the elements are
695         deleted-element sentinels.
696         (KJS::PropertyMap::checkConsistency): Check the sentinelCount.
697
698 2004-08-16  Maciej Stachowiak  <mjs@apple.com>
699
700         Code change by Eric Albert, reviewd by me.
701
702         <rdar://problem/3571960> washingtonpost.com claims I don't have cookies enabled and won't let me read articles
703
704         * kjs/date_object.cpp:
705         (timetUsingCF): Clamp time to LONG_MAX (getting rid of time_t
706         entirely would be even better, but is not required to fix this bug.
707
708 === Safari-157 ===
709
710 2004-08-16  Richard Williamson   <rjw@apple.com>
711
712         Fixed <rdar://problem/3581092> cash in KJS::Bindings::JSObject::eval at tcvetantcvetkov.com
713
714         Adds bullet proofing to protect against evaluation of bogus JS in all the flavors of bindings (Java, C, and ObjC).
715
716         Reviewed by Chris.
717
718         * bindings/NP_jsobject.cpp:
719         (NPN_Evaluate):
720         * bindings/jni/jni_jsobject.cpp:
721         (JSObject::eval):
722         * bindings/objc/WebScriptObject.mm:
723         (-[WebScriptObject evaluateWebScript:]):
724
725 2004-08-15  Richard Williamson   <rjw@apple.com>
726
727         More updates to np headers.  Implemented new NPN functions.
728
729         Reviewed by Darin.
730
731         * bindings/NP_jsobject.cpp:
732         (NPN_HasProperty):
733         (NPN_HasMethod):
734         * bindings/npapi.h:
735         * bindings/npruntime.h:
736
737 2004-08-13  Darin Adler  <darin@apple.com>
738
739         - fix build so we can compile again
740
741         * bindings/npapi.h: Added. Richard forgot to check this in. The one I'm checking in here
742         is good enough so that we can compile, but it's only a stopgap measure, because I think
743         Richard has a newer one he wants to check in.
744
745 2004-08-12  Richard Williamson   <rjw@apple.com>
746
747         Bring npruntime.h and friends closer to compliance with
748         latest spec.
749
750         Reviewed by Maciej.
751
752         * JavaScriptCore.pbproj/project.pbxproj:
753         * bindings/NP_jsobject.cpp:
754         (jsAllocate):
755         (_NPN_CreateScriptObject):
756         (NPN_Call):
757         (NPN_Evaluate):
758         (NPN_GetProperty):
759         (NPN_SetProperty):
760         (NPN_RemoveProperty):
761         * bindings/NP_jsobject.h:
762         * bindings/c/c_instance.cpp:
763         (CInstance::invokeMethod):
764         * bindings/c/c_utility.cpp:
765         (convertNPVariantToValue):
766         * bindings/npruntime.cpp:
767         (NPN_IdentifierIsString):
768         (NPN_VariantIsVoid):
769         (NPN_VariantIsNull):
770         (NPN_VariantIsUndefined):
771         (NPN_VariantIsBool):
772         (NPN_VariantIsInt32):
773         (NPN_VariantIsDouble):
774         (NPN_VariantIsString):
775         (NPN_VariantIsObject):
776         (NPN_VariantToBool):
777         (NPN_VariantToString):
778         (NPN_VariantToInt32):
779         (NPN_VariantToDouble):
780         (NPN_VariantToObject):
781         (NPN_InitializeVariantAsVoid):
782         (NPN_InitializeVariantAsNull):
783         (NPN_InitializeVariantAsUndefined):
784         (NPN_InitializeVariantWithBool):
785         (NPN_InitializeVariantWithInt32):
786         (NPN_InitializeVariantWithDouble):
787         (NPN_InitializeVariantWithString):
788         (NPN_InitializeVariantWithStringCopy):
789         (NPN_InitializeVariantWithObject):
790         (NPN_InitializeVariantWithVariant):
791         (NPN_ReleaseVariantValue):
792         (NPN_CreateObject):
793         * bindings/npruntime.h:
794         (_NPString::):
795         (_NPString::_NPVariant::):
796         * bindings/npruntime_priv.h: Added.
797
798 2004-08-12  Darin Adler  <darin@apple.com>
799
800         Reviewed by Adele.
801
802         - fixed 3 problems with parse functions that I just wrote, fixing 3 more Mozilla JavaScript tests
803
804         * kjs/function.cpp:
805         (KJS::parseDigit): Fix typo, 'Z' instead of 'z', that prevented lowercase hex digits from working.
806         (KJS::parseInt): Add octal support. Specification says it's optional, but I guess not.
807         (KJS::parseFloat): Fix check for "0x" in parseFloat to return 0 rather than NaN. Also add code
808         to skip leading "+" or "-".
809
810 === Safari-156 ===
811
812 2004-08-12  Darin Adler  <darin@apple.com>
813
814         Reviewed by Ken.
815
816         - fixed 43 Mozilla JavaScript tests
817
818         * kjs/date_object.h: Change parseDate and timeClip to take and return doubles.
819         * kjs/date_object.cpp:
820         (DateObjectImp::construct): Change to use a timeClip function that takes and returns a double rather
821         than constructing a number object to pass to it.
822         (DateObjectFuncImp::call): Change to use a parseDate function that returns a double.
823         (KJS::parseDate): Change to return a double instead of creating the Number object here.
824         (KJS::timeClip): Implement this as specified in the language standard.
825
826         * kjs/error_object.cpp: (NativeErrorImp::NativeErrorImp): Set the DontDelete, ReadOnly, and DontEnum
827         flags on the prototype property.
828
829         * kjs/function.cpp:
830         (KJS::FunctionImp::get): Return null rather than undefined for arguments when the function is not
831         currently in scope.
832         (KJS::isStrWhiteSpace): Added. Matches specification for StrWhiteSpace. Could move it to some utility
833         file later.
834         (KJS::parseDigit): Added. Helper function for parseInt.
835         (KJS::parseInt): Added. Integer parser that puts result in a double so we're not limited to what
836         strtoll can handle. Also matches standard more closely.
837         (KJS::parseFloat): Added. Handles "0x" properly and passes flag to make empty string turn into NaN
838         instead of 0.
839         (KJS::GlobalFuncImp::call): Use the new parseInt and parseFloat.
840
841         * kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): Add a length property.
842
843         * kjs/lexer.h: Added error flag and sawError() function for detecting errors.
844         * kjs/lexer.cpp:
845         (Lexer::setCode): Clear error state.
846         (Lexer::lex): Set error state if the lexer encounters an error
847
848         * kjs/internal.cpp:
849         (NumberImp::toString): Roll in change from KDE version to special case 0 so we handle -0 correctly.
850         (Parser::parse): Use new lexer error method so those errors are treated like parser errors.
851
852         * kjs/math_object.cpp: (MathFuncImp::call): Change min and max to treat -0 as less than +0.
853         Change round to round values between -0.5 and -0 to -0 instead of +0.
854
855         * kjs/nodes.h: Add evaluateReference function to GroupNode.
856         * kjs/nodes.cpp: (GroupNode::evaluateReference): Pass references through groups (parenthesized
857         expressions) properly so that expressions like "delete (x.y)" work. Before, the parentheses
858         would change x.y into a value that can't be deleted as a side effect.
859
860         * kjs/string_object.cpp: Change parameter count for indexOf and lastIndexOf from 2 to 1 to match
861         the specification.
862
863         * kjs/testkjs.cpp: Rolled in changes from KDE to add a "quit" function to the test tool and
864         get rid of the fixed size limit for code.
865
866         * kjs/ustring.cpp: (KJS::UString::substr): Added optimized case for substr(0, length) so it just
867         returns the string without creating a new Rep, since I'm using substr in a place where it will
868         often be passed a 0.
869
870         * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed one wrong entry in the Unicode table I added to
871         the other day that was making a couple tests fail.
872         * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto.
873         * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto.
874         * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto.
875         * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto.
876         * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto.
877
878         * kjs/string_object.lut.h: Regenerated.
879
880 2004-08-11  Darin Adler  <darin@apple.com>
881
882         - fixed a tiny problem with the UTF-16 PCRE check-in
883
884         * pcre/maketables.c: (pcre_maketables): Fix mistake in table-generating code that sometimes caused
885         the ctype_meta flag to get set in items that should not have it.
886
887         * pcre/chartables.c: Regenerated.
888
889 2004-08-10  Richard Williamson   <rjw@apple.com>
890
891         Fixed <rdar://problem/3674747> Need to implement invokeUndefinedMethodFromWebScript:withArguments:
892
893         The following WebScripting methods are now supported on bound
894         objects:
895
896         - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args;
897         - (void)setValue:(id)value forUndefinedKey:(NSString *)key
898         - (id)valueForUndefinedKey:(NSString *)key
899
900         Reviewed by Chris.
901
902         * bindings/c/c_class.cpp:
903         (CClass::fieldNamed):
904         * bindings/c/c_class.h:
905         * bindings/jni/jni_class.cpp:
906         (JavaClass::fieldNamed):
907         * bindings/jni/jni_class.h:
908         * bindings/objc/objc_class.h:
909         (KJS::Bindings::ObjcClass::isa):
910         * bindings/objc/objc_class.mm:
911         (ObjcClass::methodsNamed):
912         (ObjcClass::fieldNamed):
913         (ObjcClass::fallbackObject):
914         * bindings/objc/objc_instance.h:
915         * bindings/objc/objc_instance.mm:
916         (ObjcInstance::invokeMethod):
917         (ObjcInstance::setValueOfField):
918         (ObjcInstance::setValueOfUndefinedField):
919         (ObjcInstance::getValueOfField):
920         (ObjcInstance::getValueOfUndefinedField):
921         * bindings/objc/objc_runtime.h:
922         (KJS::Bindings::ObjcField::~ObjcField):
923         (KJS::Bindings::ObjcField::ObjcField):
924         (KJS::Bindings::ObjcField::operator=):
925         (KJS::Bindings::FallbackObjectImp::classInfo):
926         * bindings/objc/objc_runtime.mm:
927         (ObjcField::ObjcField):
928         (ObjcField::name):
929         (ObjcField::type):
930         (ObjcField::valueFromInstance):
931         (ObjcField::setValueToInstance):
932         (FallbackObjectImp::FallbackObjectImp):
933         (FallbackObjectImp::get):
934         (FallbackObjectImp::put):
935         (FallbackObjectImp::canPut):
936         (FallbackObjectImp::implementsCall):
937         (FallbackObjectImp::call):
938         (FallbackObjectImp::hasProperty):
939         (FallbackObjectImp::deleteProperty):
940         (FallbackObjectImp::defaultValue):
941         * bindings/runtime.h:
942         (KJS::Bindings::Class::fallbackObject):
943         (KJS::Bindings::Instance::getValueOfUndefinedField):
944         (KJS::Bindings::Instance::setValueOfUndefinedField):
945         * bindings/runtime_object.cpp:
946         (RuntimeObjectImp::get):
947         (RuntimeObjectImp::put):
948         (RuntimeObjectImp::canPut):
949         (RuntimeObjectImp::hasProperty):
950         * bindings/testbindings.mm:
951         (-[MyFirstInterface valueForUndefinedKey:]):
952         (-[MyFirstInterface setValue:forUndefinedKey:]):
953
954 2004-08-10  Darin Adler  <darin@apple.com>
955
956         Reviewed by Dave.
957
958         - switch PCRE to do UTF-16 directly instead of converting to/from UTF-8 for speed
959
960         * pcre/pcre.h: Added PCRE_UTF16 switch, set to 1. Added pcre_char typedef, which is char
961         or uint16_t depending on the mode, and used appropriate in the 7 public functions
962         that need to use it.
963         * pcre/pcre.c: Add UTF-16 support to all functions.
964         * pcre/study.c: Ditto.
965
966         * pcre/internal.h: Added ichar typedef, which is unsigned char or uint16_t depending on
967         the mode. Changed declarations to use symbolic constants and typedefs so we size
968         things to ichar when needed.
969
970         * pcre/maketables.c: (pcre_maketables): Change code to make tables that are
971         sized to 16-bit characters instead of 8-bit.
972
973         * pcre/get.c:
974         (pcre_copy_substring): Use pcre_char instead of char.
975         (pcre_get_substring_list): Ditto.
976         (pcre_free_substring_list): Ditto.
977         (pcre_get_substring): Ditto.
978         (pcre_free_substring): Ditto.
979
980         * pcre/dftables.c: (main): Used a bit more const, and use ICHAR sizes instead
981         of hard-coding 8-bit table sizes.
982
983         * pcre/chartables.c: Regenerated.
984
985         * kjs/ustring.h: Remove functions that convert UTF-16 to/from UTF-8 offsets.
986         * kjs/ustring.cpp: Change the shared empty string to have a unicode pointer that
987         is not null. The null string still has a null pointer. This prevents us from
988         passing a null through to the regular expression engine (which results in a null
989         error even when the string length is 0).
990
991         * kjs/regexp.cpp:
992         (KJS::RegExp::RegExp): Null-terminate the pattern and pass it.
993         (KJS::RegExp::match): Use the 16-bit string directly, no need to convert to UTF-8.
994
995 2004-08-09  Darin Adler  <darin@apple.com>
996
997         Reviewed by Maciej.
998
999         - fixed 28 Mozilla JavaScript tests
1000
1001         * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Check for undefined rather than
1002         checking the number of arguments for the join method.
1003
1004         * kjs/lexer.cpp: (Lexer::lex): Parse hexadecimal and octal constants in doubles rather
1005         than integers, so we aren't limited to 32 bits.
1006
1007         * kjs/math_object.cpp: (MathFuncImp::call): Get rid of many unneeded special cases in
1008         the implementation of the pow operation. Also simplied a case that was handling positive
1009         and negative infinity separately.
1010
1011         * kjs/nodes.cpp: (ShiftNode::evaluate): Keep the result of shifts in a double instead of
1012         putting them in a long, so that unsigned shift will work properly.
1013
1014         * kjs/number_object.cpp: Add the DontDelete and ReadOnly flags to the numeric constants.
1015
1016         * kjs/operations.cpp:
1017         (KJS::isPosInf): Added an implementation inside APPLE_CHANGES that does not depend on the
1018         sign of isinf; our isinf function returns +1 even for negative infinity.
1019         (KJS::isNegInf): And again.
1020         (KJS::relation): Put in a nice simple implementation of comparison inside APPLE_CHANGES.
1021         Our floating point already handles the various infinity cases correctly.
1022
1023         * kjs/regexp_object.cpp:
1024         (RegExpProtoFuncImp::call): Add missing return before Null() in Exec method.
1025         (RegExpObjectImp::arrayOfMatches): Put undefined rather than an empty string into the
1026         array in cases where we did not match.
1027         (RegExpObjectImp::construct): Set the DontDelete, ReadOnly, and DontEnum flags for
1028         "global", "ignoreCase", "multiline", and "source".
1029
1030         * kjs/string_object.cpp: (StringProtoFuncImp::call): For the match method, turn a null
1031         string into undefined rather than an empty string. For the slice method, handle an
1032         undefined parameter for the limit properly as decribed in the specification, and add
1033         the limit to one case that didn't have the limit at all. For the methods that generate
1034         HTML strings, use lowercase tags instead of uppercase.
1035
1036         * kjs/ustring.cpp:
1037         (KJS::UChar::toLower): Use u_tolower from the ICU library.
1038         (KJS::UChar::toUpper): Use u_toupper from the ICU library.
1039         (KJS::UString::append): Fix some math that caused a buffer overflow.
1040         (KJS::convertUTF16OffsetsToUTF8Offsets): Ignore negative numbers (-1 is used as a special
1041         flag) rather than converting them all to 0.
1042         (KJS::convertUTF8OffsetsToUTF16Offsets): Ditto.
1043
1044         * tests/mozilla/jsDriver.pl: Fixed the relative links to point to our actual test files.
1045
1046         * tests/mozilla/ecma/String/15.5.4.11-1.js: Fixed the Unicode table in this test to match
1047         the Unicode specification in a few cases where it was wrong before.
1048         * tests/mozilla/ecma/String/15.5.4.11-2.js: Ditto.
1049         * tests/mozilla/ecma/String/15.5.4.11-3.js: Ditto.
1050         * tests/mozilla/ecma/String/15.5.4.11-5.js: Ditto.
1051         * tests/mozilla/ecma/String/15.5.4.11-6.js: Ditto.
1052         * tests/mozilla/ecma/String/15.5.4.12-1.js: Ditto.
1053         * tests/mozilla/ecma/String/15.5.4.12-2.js: Ditto.
1054         * tests/mozilla/ecma/String/15.5.4.12-3.js: Ditto.
1055         * tests/mozilla/ecma/String/15.5.4.12-4.js: Ditto.
1056         * tests/mozilla/ecma/String/15.5.4.12-5.js: Ditto.
1057
1058         * JavaScriptCore.pbproj/project.pbxproj: Link to libicu.
1059
1060         * kjs/number_object.lut.h: Regenerated.
1061
1062 2004-08-09  Darin Adler  <darin@apple.com>
1063
1064         Reviewed by Maciej.
1065
1066         - fixed <rdar://problem/3753467> REGRESSION (137-138): reproducible buffer overrun in UString manipulation code
1067
1068         * kjs/ustring.cpp: (KJS::UString::append): Fix incorrect size computation. Without it
1069         we get a buffer overflow.
1070
1071 === Safari-155 ===
1072
1073 2004-08-05  Richard Williamson   <rjw@apple.com>
1074
1075         Fixed part of 3674747.  The QT guys need this for feature freeze.
1076
1077         This patch implements support for the
1078
1079         - (id)invokeUndefinedMethodFromWebScript:(NSString *)name withArguments:(NSArray *)args
1080
1081         method of objects bound to JavaScript.
1082
1083         Reviewed by John.
1084
1085         * ChangeLog:
1086         * bindings/objc/objc_class.mm:
1087         (ObjcClass::methodsNamed):
1088         (ObjcClass::fieldNamed):
1089         * bindings/objc/objc_instance.mm:
1090         (ObjcInstance::invokeMethod):
1091         * bindings/objc/objc_runtime.h:
1092         (KJS::Bindings::ObjcMethod::~ObjcMethod):
1093         (KJS::Bindings::ObjcMethod::isFallbackMethod):
1094         (KJS::Bindings::ObjcMethod::javaScriptName):
1095         * bindings/objc/objc_runtime.mm:
1096         (ObjcMethod::ObjcMethod):
1097         (ObjcMethod::getMethodSignature):
1098         (ObjcMethod::setJavaScriptName):
1099         * bindings/testbindings.mm:
1100
1101 2004-08-04  Vicki Murley  <vicki@apple.com>
1102
1103         Reviewed by mjs.
1104  
1105         - fix <rdar://problem/3649789> SAP WebGUI has problems loading first page because of parse error        
1106
1107         * kjs/lexer.cpp:
1108         (Lexer::lex): if the current character is a '\' and the next character is a line terminator,
1109         go to the next line and continue parsing the string (instead of failing).  This matches 
1110         behavior in Mac IE and Mozilla.
1111
1112 2004-08-03  Kevin Decker  <kdecker@apple.com>
1113
1114         Reviewed by Darin.
1115
1116         Rolled in changes from the latest KJS sources that support additional 
1117         Number.prototype functions. 
1118
1119         Specifically this patch covers the follow parts of the ECMA 3 spec:
1120         15.7.4.5, 15.7.4.6, and 15.7.4.7 
1121         
1122         Fixes:
1123         <rdar://problem/3663716> missing Number.toFixed (and toPrecision, toExponential)
1124         <rdar://problem/3749492> missing Number.toPrecision prototype implementation
1125         <rdar://problem/3749591> missing Number.toExponential prototype implementation
1126
1127         * kjs/identifier.h: Added toFixed, toPrecision, and toExponential to the
1128         list of supported identifiers (a macro).
1129         * kjs/number_object.cpp: Implemented support for toFixed(), toPrecision(),
1130         and toExponential(). 
1131         (NumberPrototypeImp::NumberPrototypeImp):
1132         (NumberProtoFuncImp::call):
1133         * kjs/number_object.h: Added property names for toFixed, toPrecision,
1134         and toExponential. 
1135         (KJS::NumberProtoFuncImp::):
1136         * tests/mozilla/expected.html: Update results.
1137
1138 2004-08-03  Darin Adler  <darin@apple.com>
1139
1140         Reviewed by Ken.
1141
1142         - added support for copying RegExp objects so 7 more Mozilla regexp tests pass
1143
1144         * kjs/regexp_object.cpp: (RegExpObjectImp::construct): Check for case where
1145         we are supposed to just copy the regular expression object, and do so.
1146         Also tighten up arguments check to handle case where an actual "undefined"
1147         is passed rather than just omitting an argument.
1148
1149         * tests/mozilla/expected.html: Update results.
1150
1151 2004-08-02  Darin Adler  <darin@apple.com>
1152
1153         * tests/mozilla/.cvsignore: Added.
1154         * tests/mozilla/expected.html: Update results.
1155
1156 2004-08-02  Darin Adler  <darin@apple.com>
1157
1158         Reviewed by Ken.
1159
1160         - fixed RegExp.toString so 3 more Mozilla regexp tests pass
1161
1162         * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call):
1163         Append the flags here so more tests paseed.
1164
1165 2004-08-02  Darin Adler  <darin@apple.com>
1166
1167         Reviewed by Ken.
1168
1169         - fixed a couple things making 5 Mozilla regexp tests pass
1170
1171         * kjs/regexp_object.cpp: (RegExpProtoFuncImp::call): Implement toString
1172         for the prototype.
1173         (RegExpObjectImp::construct): Fix bug where the string "undefined" would
1174         be used as the flags string when no parameter was passed.
1175
1176         * kjs/regexp_object.h: (KJS::RegExpPrototypeImp::classInfo):
1177         Added a class info object for RegExp prototype so it can return
1178         a string instead of raising an exception when converting to a string.
1179
1180         * tests/mozilla/expected.html: Update results.
1181
1182 2004-08-02  Darin Adler  <darin@apple.com>
1183
1184         Reviewed by Kevin.
1185
1186         - fix crashes in mozilla tests due to mishandling NaN
1187
1188         * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Rerranged range checks after
1189         calls to toInteger so that NaN will get turned into something that fits in an integer.
1190         These were the ones John already fixed, but his fix used isnan and the new fix is
1191         more efficient.
1192
1193         * kjs/number_object.cpp: (NumberProtoFuncImp::call): Rearranged radix range checks
1194         after a call to toInteger to handle NaN properly. Also removed separate check
1195         for undefined that's not needed.
1196
1197         * kjs/string_object.cpp: (StringProtoFuncImp::call): More of the same kinds of changes
1198         as in the above two files, but for a lot more functions. Also changed one place with
1199         an explicit check for undefined to instead just check isNaN.
1200
1201         * tests/mozilla/run-mozilla-tests: Changed to invoke jst using $SYMROOTS for people
1202         like me who don't keep $SYMROOTS in their $PATH.
1203
1204 === Safari-154 ===
1205
1206 === Safari-153 ===
1207
1208 2004-07-26  Kevin Decker  <kdecker@apple.com>
1209
1210         Changes done by Darin, reviewed by Kevin.
1211
1212         - changed testkjs to build in Xcode rather than from Makefile
1213
1214         * .cvsignore: Removed obsolete files from this list.
1215         * Makefile.am: Removed code to build testkjs; we do this in Xcode now.
1216         Changed to build target "All" rather than default target. This makes us
1217         build the testkjs test tool.
1218         * dummy.cpp: Removed.
1219         * kjs/.cvsignore: Removed obsolete files from this list, including
1220         the testkjs tool, which is now built in the symroots directory.
1221         * kjs/testkjs.cpp: Added copyright notice that was missing, since we have
1222         changed this file. Also this has the nice side effect of causing the tool
1223         to be rebuilt in the new location even if there are no other changes in
1224         your tree when you check this out.
1225         * tests/mozilla/run-mozilla-tests: Invoke perl explicitly so this works
1226         without setting the execute bit on jsDriver.pl.
1227
1228 2004-07-22  Kevin Decker  <kdecker@apple.com>
1229
1230         Reviewed by Darin
1231         
1232         Fixed <rdar://problem/3682340> (error console does not include source urls or line numbers of event exceptions). 
1233
1234         * kjs/function_object.cpp:
1235         (FunctionObjectImp::construct):
1236         * kjs/function_object.h:
1237         * kjs/object.cpp:
1238         (KJS::ObjectImp::construct):
1239         * kjs/object.h:
1240         (KJS::Object::construct):
1241
1242 2004-07-21  Darin Adler  <darin@apple.com>
1243
1244         * bindings/npruntime.h: Fixed typo.
1245
1246 2004-07-19  John Sullivan  <sullivan@apple.com>
1247
1248         Reviewed by Maciej.
1249         
1250         - bulletproofed array.slice() against NAN arguments. Harri noticed this
1251         vulnerability in my patch for 3714644
1252
1253         * kjs/array_object.cpp:
1254         (ArrayProtoFuncImp::call):
1255         handle NAN parameters passed to slice() by clamping to 0 and length.
1256
1257 2004-07-19  Richard Williamson   <rjw@apple.com>
1258
1259         Fixed 3733349.  Prevent Java applet callbacks into JavaScript after applet
1260         has been destroyed.
1261
1262         Reviewed by John.
1263
1264         * bindings/jni/jni_jsobject.cpp:
1265         (JSObject::invoke):
1266         (JSObject::JSObject):
1267
1268 2004-07-16  John Sullivan  <sullivan@apple.com>
1269
1270         Reviewed by Maciej.
1271         
1272         - fixed <rdar://problem/3714644> REGRESSION (125.8-146): bugzilla submit link 
1273         hangs browser with javascript
1274
1275         * kjs/array_object.cpp:
1276         (ArrayProtoFuncImp::call):
1277         Check for undefined type for args[0] the same way we were already checking
1278         for args[1]. In this case, args was zero-length, but we were treating
1279         args[0] like an integer anyway. Resulted in some code looping from a NAN
1280         value to 4, taking approximately forever.
1281
1282         * JavaScriptCore.pbproj/project.pbxproj:
1283         version wars
1284         
1285 === Safari-152 ===
1286
1287 2004-07-14  Maciej Stachowiak  <mjs@apple.com>
1288
1289         Reviewed by John.
1290
1291         <rdar://problem/3711474>: (REGRESSION (125-146): JavaScript 'toString(16)' is broken)
1292         <rdar://problem/3644873>: (REGRESSION (125-140u): secondary list doesn't fill in at Southwest.com)
1293
1294         * kjs/number_object.cpp:
1295         (NumberProtoFuncImp::call): Initialize radix from dradix, not from itself!
1296
1297 2004-07-13  Kevin Decker  <kdecker@apple.com>
1298
1299         Reviewed by kocienda.
1300
1301         - made testkjs and JavaScriptCore a subtarget of 'All'
1302         - testkjs now builds in $SYMROOTS
1303
1304         * JavaScriptCore.pbproj/project.pbxproj:
1305
1306 === Safari-151 ===
1307
1308 2004-06-24  Chris Blumenberg  <cblu@apple.com>
1309
1310         Ignore .mode1 files in JavaScriptCore.pbproj
1311
1312         Reviewed by kocienda.
1313
1314         * JavaScriptCore.pbproj/.cvsignore:
1315
1316 2004-06-23  Richard Williamson   <rjw@apple.com>
1317
1318         Implemented changes for latest npruntime.h.
1319         
1320         Reviewed by Chris.
1321
1322         * JavaScriptCore.pbproj/project.pbxproj:
1323         * bindings/NP_jsobject.cpp:
1324         (listFromVariantArgs):
1325         (identiferFromNPIdentifier):
1326         (_NPN_CreateScriptObject):
1327         (NPN_Call):
1328         (NPN_Evaluate):
1329         (NPN_GetProperty):
1330         (NPN_SetProperty):
1331         (NPN_RemoveProperty):
1332         * bindings/NP_jsobject.h:
1333         * bindings/c/c_class.cpp:
1334         (CClass::methodsNamed):
1335         (CClass::fieldNamed):
1336         * bindings/c/c_instance.cpp:
1337         (CInstance::invokeMethod):
1338         * bindings/c/c_utility.cpp:
1339         (convertNPVariantToValue):
1340         * bindings/c/c_utility.h:
1341         * bindings/npruntime.cpp:
1342         (stringIdentifierEqual):
1343         (stringIdentifierHash):
1344         (getStringIdentifierDictionary):
1345         (intIdentifierEqual):
1346         (intIdentifierHash):
1347         (getIntIdentifierDictionary):
1348         (NPN_GetStringIdentifier):
1349         (NPN_GetStringIdentifiers):
1350         (NPN_GetIntIdentifier):
1351         (NPN_IdentifierIsString):
1352         (NPN_UTF8FromIdentifier):
1353         (NPN_VariantToInt32):
1354         (NPN_VariantToDouble):
1355         (NPN_SetException):
1356         * bindings/npruntime.h:
1357         * bindings/objc/WebScriptObject.mm:
1358         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
1359         * bindings/runtime_object.cpp:
1360         (RuntimeObjectImp::~RuntimeObjectImp):
1361         * bindings/runtime_root.cpp:
1362         (KJS::Bindings::rootForInterpreter):
1363         * bindings/testbindings.cpp:
1364         (initializeIdentifiers):
1365         (logMessage):
1366         (setDoubleValue):
1367         (setIntValue):
1368         (setBooleanValue):
1369
1370 === JavaScriptCore-146.1 ===
1371
1372 2004-06-16  Richard Williamson   <rjw@apple.com>
1373
1374         Fixed <rdar://problem/3702287> Crash returning nil from bound ObjC
1375
1376         This turned out to be a show stopper for Dashboard.  Accessing a nil
1377         ObjC property from JS caused a crash.  Similar to the problem
1378         3696112 fixed below.
1379         
1380         Reviewed by Trey.
1381
1382         * bindings/objc/objc_runtime.mm:
1383         (KJS::Bindings::ObjcField::valueFromInstance):
1384
1385 === Safari-146 ===
1386
1387 2004-06-16  Richard Williamson   <rjw@apple.com>
1388
1389         Fixed <rdar://problem/3696112>: nil from an Objective-C class seems to get wrapped as a JavaScript proxy that will not print.
1390
1391         This turned out to be a show stopper for Dashboard.  We now
1392         return Undefined() when nil is returned from a ObjC method
1393         that returns an object type.
1394         
1395         Reviewed by Maciej.
1396
1397         * bindings/objc/objc_utility.mm:
1398         (KJS::Bindings::convertObjcValueToValue):
1399
1400 === Safari-145 ===
1401
1402 2004-06-15  Richard Williamson   <rjw@apple.com>
1403
1404         Fixed <rdar://problem/3695875>: Objective-C instances that are exported to JavaScript are too promiscuous
1405
1406         No longer need to check respondsToSelector: for
1407         isSelectorExcludedFromWebScript: and isKeyExcludedFromWebScript:
1408         because these now have a default implementation on NSObject.
1409
1410         Reviewed by Trey.
1411
1412         * bindings/objc/objc_class.mm:
1413         (ObjcClass::methodsNamed):
1414         (ObjcClass::fieldNamed):
1415
1416 2004-06-14  Darin Adler  <darin@apple.com>
1417
1418         Reviewed by Maciej.
1419
1420         - fixed some things for GC that Patrick missed, or that happened after the branch
1421
1422         * bindings/objc/WebScriptObject.mm:
1423         (-[WebScriptObject dealloc]): Moved removeNativeReference call here from private object.
1424         (-[WebScriptObject finalize]): Added.
1425
1426         - added some missing nil checks
1427
1428         * bindings/objc/objc_instance.mm:
1429         (ObjcInstance::ObjcInstance): Check for nil.
1430         (ObjcInstance::~ObjcInstance): Check for nil.
1431         (ObjcInstance::operator=): Check for nil.
1432
1433 2004-06-14  Darin Adler  <darin@apple.com>
1434
1435         Reviewed by me, code changes by Patrick Beard.
1436
1437         - fixed <rdar://problem/3671507>: (WebKit should adopt GC changes and compile with GC enabled)
1438
1439         * bindings/objc/objc_instance.mm:
1440         (ObjcInstance::ObjcInstance): Use CFRetain instead of retain.
1441         (ObjcInstance::~ObjcInstance): Use CFRelease instead of release.
1442         (ObjcInstance::operator=): More of the same.
1443         (ObjcInstance::end): Use [pool drain] if compiling on Tiger.
1444
1445         * bindings/objc/objc_runtime.mm:
1446         (ObjcArray::ObjcArray): Use CFRetain instead of retain.
1447         (ObjcArray::~ObjcArray): Use CFRelease instead of release.
1448         (ObjcArray::operator=): More of the same.
1449
1450         * bindings/testbindings.mm: Fixed incorrect license.
1451         (main): Use [pool drain] if compiling on Tiger.
1452
1453 === Safari-144 ===
1454
1455 2004-06-10  Kevin Decker  <kdecker@apple.com>
1456
1457         Reviewed by John.
1458
1459         * kjs/lexer.cpp: 
1460         (Lexer::setCode):
1461             - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)
1462         * kjs/lexer.h:
1463         (KJS::Lexer::lineNo):
1464             - fixed <rdar://problem/3682398>: (error console line numbers are offset by 1)
1465
1466 === JavaScriptCore-143.2 ===
1467
1468 2004-06-07  Darin Adler  <darin@apple.com>
1469
1470         - fixed <rdar://problem/3682489>: (JavaScriptGlue no longer compiles because Interpreter::evaluate parameters changed)
1471
1472         * kjs/interpreter.h: Added an overload to make JavaScriptGlue compile.
1473         * kjs/interpreter.cpp: (KJS::Interpreter::evaluate): Implemented the overload.
1474
1475 === JavaScriptCore-143.1 ===
1476
1477 2004-06-04  Kevin Decker  <kdecker@apple.com>
1478
1479         Reviewed by Darin
1480         
1481         - fixed <rdar://problem/3680594>
1482
1483         * kjs/object.cpp:
1484         (KJS::Error::create):
1485
1486 === Safari-143 ===
1487
1488 2004-06-04  Darin Adler  <darin@apple.com>
1489
1490         * kjs/testkjs.cpp: (main): Fix build breakage by adding URL and line number parameters.
1491
1492 2004-06-04  Kevin Decker  <kdecker@apple.com>
1493
1494         Reviewed by Dave.
1495
1496         - ObjC bindings do not (yet) pass along sourceurl or line numbers
1497         - we don't have a way as of yet to accomidate line numbers and urls for dynamic javascript
1498         - changed the wording of an error message
1499         - the lexer, parser, and interpreter have been made "sourceURL aware"
1500         - stored the url into Error
1501          
1502         * bindings/NP_jsobject.cpp:
1503         (NPN_Evaluate):
1504         * bindings/jni/jni_jsobject.cpp:
1505         (JSObject::eval):
1506         * bindings/objc/WebScriptObject.mm:
1507         (-[WebScriptObject evaluateWebScript:]):
1508         * kjs/function.cpp:
1509         (GlobalFuncImp::call):
1510         * kjs/function_object.cpp:
1511         (FunctionObjectImp::construct):
1512         * kjs/internal.cpp:
1513         (Parser::parse):
1514         (InterpreterImp::checkSyntax):
1515         (InterpreterImp::evaluate):
1516         * kjs/internal.h:
1517         * kjs/interpreter.cpp:
1518         (Interpreter::evaluate):
1519         * kjs/interpreter.h:
1520         * kjs/lexer.cpp:
1521         (Lexer::setCode):
1522         * kjs/lexer.h:
1523         (KJS::Lexer::sourceURL):
1524         * kjs/nodes.cpp:
1525         (Node::Node):
1526         (Node::throwError):
1527         (FunctionCallNode::evaluate):
1528         * kjs/nodes.h:
1529         * kjs/object.cpp:
1530         (KJS::Error::create):
1531         * kjs/object.h:
1532
1533 2004-06-04  Richard Williamson   <rjw@apple.com>
1534
1535         Fixed crash when attempting to access properties on nil
1536         object.
1537         
1538         Reviewed by John.
1539
1540         * bindings/objc/objc_instance.mm:
1541         (ObjcInstance::getClass):
1542         * bindings/runtime_object.cpp:
1543         (RuntimeObjectImp::get):
1544         * bindings/testM.js:
1545         * bindings/testbindings.mm:
1546         (-[MyFirstInterface getString]):
1547
1548 2004-05-27  Kevin Decker  <kdecker@apple.com>
1549
1550         Reviewed by Ken.
1551
1552         -revised generated error message content
1553         
1554         * kjs/error_object.cpp:
1555         (ErrorProtoFuncImp::call):
1556         * kjs/internal.cpp:
1557         (Parser::parse):
1558         * kjs/object.cpp:
1559         (KJS::Error::create):
1560
1561 === Safari-142 ===
1562
1563 2004-05-27  Richard Williamson   <rjw@apple.com>
1564
1565         Renamed WebScriptMethods to WebScripting based on feedback from Nancy.
1566
1567         Reviewed by Chris.
1568
1569         * bindings/objc/WebScriptObject.h:
1570
1571 2004-05-27  Darin Adler  <darin@apple.com>
1572
1573         Reviewed by Maciej.
1574
1575         - moved to new symlink technique for embedding frameworks
1576
1577         * JavaScriptCore.pbproj/project.pbxproj: Get rid of embed-frameworks build step
1578         because we don't need it any more.
1579
1580 2004-05-24  Richard Williamson   <rjw@apple.com>
1581
1582         Changed RuntimeArrayImp to inherit from ArrayInstanceImp and
1583         fixed ClassInfo to correctly reflect inheritance.  This is required
1584         because of the runtime checks in JSC for arrays, i.e. in
1585         the Function objects apply method.
1586
1587         Reviewed by Ken.
1588
1589         * bindings/jni/jni_runtime.cpp:
1590         (JavaArray::convertJObjectToArray):
1591         * bindings/objc/objc_utility.mm:
1592         (KJS::Bindings::convertObjcValueToValue):
1593         * bindings/runtime_array.cpp:
1594         (RuntimeArrayImp::RuntimeArrayImp):
1595         * bindings/runtime_array.h:
1596         * bindings/testM.js: Added.
1597         * bindings/testbindings.mm:
1598         (+[MyFirstInterface webScriptNameForSelector:]):
1599         (-[MyFirstInterface logMessages:]):
1600         (-[MyFirstInterface logMessage:prefix:]):
1601         (-[MyFirstInterface callJSObject::]):
1602
1603 2004-05-22  Darin Adler  <darin@apple.com>
1604
1605         Reviewed by Maciej.
1606
1607         - fixed <rdar://problem/3664260>: (JS needs to listen to timezone change notifications)
1608
1609         * kjs/date_object.cpp: (CopyLocalTimeZone): As per Chris Kane and Jordan Hubbard, use <notify.h>
1610         with a hardcoded string of "com.apple.system.timezone", and do CFTimeZoneResetSystem since
1611         CoreFoundation doesn't do this itself. Turns out this affects the default time zone as long as
1612         it hasn't been set explicitly.
1613
1614 === Safari-141 ===
1615
1616 2004-05-20  Richard Williamson   <rjw@apple.com>
1617
1618         Implemented WebScriptObject/DOM wrapper voodoo.  DOM wrappers
1619         can now be referenced like any other WebScriptObject, meaning
1620         you can do JS operations on them.
1621
1622         All added implementation of finalizeForWebScript.
1623
1624         Reviewed by Ken.
1625
1626         * bindings/objc/WebScriptObject.h:
1627         * bindings/objc/WebScriptObject.mm:
1628         (-[WebScriptObject _initializeWithObjectImp:KJS::root:Bindings::]):
1629         (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]):
1630         (-[WebScriptObject KJS::]):
1631         (-[WebScriptObject dealloc]):
1632         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1633         (-[WebScriptObject evaluateWebScript:]):
1634         (-[WebScriptObject setValue:forKey:]):
1635         (-[WebScriptObject valueForKey:]):
1636         (-[WebScriptObject stringRepresentation]):
1637         * bindings/objc/WebScriptObjectPrivate.h:
1638         * bindings/objc/objc_instance.mm:
1639         (ObjcInstance::~ObjcInstance):
1640
1641 2004-05-19  Richard Williamson   <rjw@apple.com>
1642
1643         Removed extraneous tabs that were added (by XCode?).
1644
1645         * bindings/objc/WebScriptObject.h:
1646
1647 2004-05-19  Darin Adler  <darin@apple.com>
1648
1649         - fixed headers with licenses mangled by Xcode auto-indenting
1650
1651         * bindings/jni/jni_jsobject.cpp:
1652         * bindings/jni/jni_jsobject.h:
1653         * bindings/runtime_array.h:
1654         * bindings/runtime_root.cpp:
1655         * bindings/runtime_root.h:
1656
1657 2004-05-18  Richard Williamson   <rjw@apple.com>
1658
1659         Added exception logging.  Also check for exception and
1660         set results as appropriate.
1661
1662         Reviewed by Maciej (partially reviewed).
1663
1664         * bindings/objc/WebScriptObject.mm:
1665         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1666         (-[WebScriptObject evaluateWebScript:]):
1667         (-[WebScriptObject setValue:forKey:]):
1668         (-[WebScriptObject valueForKey:]):
1669
1670 2004-05-18  Richard Williamson   <rjw@apple.com>
1671
1672         Finsished implementing support for windowScriptObject.
1673         Had to make WebScriptObjectPrivate.h accessible from
1674         WebCore.
1675
1676         Reviewed by Maciej.
1677
1678         * JavaScriptCore.pbproj/project.pbxproj:
1679         * bindings/objc/WebScriptObjectPrivate.h:
1680
1681 2004-05-18  Richard Williamson   <rjw@apple.com>
1682
1683         Use KVC to set/get values instead of directly accessing
1684         ivars.
1685
1686         Reviewed by Maciej.
1687
1688         * bindings/objc/WebScriptObject.mm:
1689         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1690         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
1691         * bindings/objc/objc_runtime.mm:
1692         (ObjcField::valueFromInstance):
1693         (convertValueToObjcObject):
1694         (ObjcField::setValueToInstance):
1695
1696 2004-05-17  Richard Williamson   <rjw@apple.com>
1697
1698         Implemented new API for WebScriptObject.
1699
1700         Fixed <rdar://problem/3657145>: (objc to javascript method calls do not cause updates.)
1701         Fixed <rdar://problem/3654887>: (Update to JSC to refer to new JSObject LiveConnect object)  (w/ help from Vicki)
1702
1703         Reviewed by Hyatt.
1704
1705         * JavaScriptCore.pbproj/project.pbxproj:
1706         * bindings/c/c_instance.cpp:
1707         (CInstance::invokeMethod):
1708         * bindings/jni/jni_instance.cpp:
1709         (JavaInstance::invokeMethod):
1710         * bindings/jni/jni_jsobject.cpp:
1711         (JSObject::convertValueToJObject):
1712         * bindings/jni/jni_utility.cpp:
1713         (KJS::Bindings::getJNIField):
1714         * bindings/objc/WebScriptObject.mm:
1715         (_didExecute):
1716         (-[WebScriptObject _initWithObjectImp:KJS::root:Bindings::]):
1717         (-[WebScriptObject KJS::]):
1718         (-[WebScriptObject dealloc]):
1719         (+[WebScriptObject throwException:]):
1720         (listFromNSArray):
1721         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1722         (-[WebScriptObject evaluateWebScript:]):
1723         (-[WebScriptObject setValue:forKey:]):
1724         (-[WebScriptObject valueForKey:]):
1725         (-[WebScriptObject stringRepresentation]):
1726         (+[WebScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
1727         (+[WebUndefined undefined]):
1728         (-[WebUndefined initWithCoder:]):
1729         (-[WebUndefined encodeWithCoder:]):
1730         (-[WebUndefined copyWithZone:]):
1731         (-[WebUndefined retain]):
1732         (-[WebUndefined release]):
1733         (-[WebUndefined retainCount]):
1734         (-[WebUndefined autorelease]):
1735         (-[WebUndefined dealloc]):
1736         (-[WebUndefined copy]):
1737         (-[WebUndefined replacementObjectForPortCoder:]):
1738         * bindings/objc/WebScriptObjectPrivate.h: Added.
1739         * bindings/objc/objc_class.mm:
1740         (ObjcClass::methodsNamed):
1741         (ObjcClass::fieldNamed):
1742         * bindings/objc/objc_instance.mm:
1743         (ObjcInstance::invokeMethod):
1744         * bindings/objc/objc_jsobject.h:
1745         * bindings/objc/objc_jsobject.mm:
1746         * bindings/objc/objc_runtime.mm:
1747         (ObjcField::valueFromInstance):
1748         * bindings/objc/objc_utility.mm:
1749         (KJS::Bindings::JSMethodNameToObjCMethodName):
1750         (KJS::Bindings::convertValueToObjcValue):
1751         (KJS::Bindings::convertObjcValueToValue):
1752         * bindings/runtime.cpp:
1753         (Instance::setDidExecuteFunction):
1754         (Instance::didExecuteFunction):
1755         (Instance::setValueOfField):
1756         * bindings/runtime.h:
1757         * bindings/testbindings.mm:
1758         (+[MyFirstInterface webScriptNameForSelector:]):
1759         (-[MyFirstInterface callJSObject::]):
1760
1761 2004-05-14  Vicki Murley  <vicki@apple.com>
1762
1763         Reviewed by mjs.
1764  
1765         <rdar://problem/3642427>: framework marketing number should be 2.0 for DoubleBarrel release
1766
1767         * JavaScriptCore.pbproj/project.pbxproj: change CFBundleShortVersionString to 2.0
1768
1769 === Safari-140 ===
1770
1771 2004-05-13  Richard Williamson   <rjw@apple.com>
1772
1773         Fixed indentation.
1774
1775         Reviewed by Chris.
1776
1777         * ChangeLog:
1778         * bindings/objc/WebScriptObject.h:
1779
1780 2004-05-13  Richard Williamson   <rjw@apple.com>
1781
1782         Approved API changes.  Currently unimplemented.
1783
1784         Reviewed by Chris.
1785
1786         * ChangeLog:
1787         * JavaScriptCore.pbproj/project.pbxproj:
1788         * bindings/objc/WebScriptObject.h: Added.
1789         * bindings/objc/WebScriptObject.mm: Added.
1790         (+[WebScriptObject throwException:]):
1791         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1792         (-[WebScriptObject evaluateWebScript:]):
1793         (-[WebScriptObject stringRepresentation]):
1794         (+[WebUndefined undefined]):
1795         (-[WebUndefined initWithCoder:]):
1796         (-[WebUndefined encodeWithCoder:]):
1797         (-[WebUndefined copyWithZone:]):
1798
1799 2004-05-07  Vicki Murley  <vicki@apple.com>
1800
1801         Reviewed by darin.
1802
1803         Turn off GC since it uses ppc only instructions (which breaks 
1804         the B&I build).   
1805     
1806         * kjs/value.h: set USE_CONSERVATIVE_GC to 0
1807
1808 === Safari-139 ===
1809
1810 2004-05-07  Maciej Stachowiak  <mjs@apple.com>
1811
1812         Reviewed by Darin.
1813
1814         - add -funroll-loops=16 compiler option for approx .5% speedup on
1815         HTML iBench and .5-1% speedup on JS iBench.
1816         
1817         * JavaScriptCore.pbproj/project.pbxproj:
1818
1819 2004-04-25  Maciej Stachowiak  <mjs@apple.com>
1820
1821         Reviewed by Darin.
1822
1823         Enable full conservative GC mode in addition to test mode. When
1824         conservative GC is enabled, we now get an 11% speed improvement on
1825         the iBench. Also fix some spots I missed before.
1826
1827         Specific noteworth changes:
1828         
1829         * kjs/collector.cpp:
1830         (KJS::Collector::markStackObjectsConservatively): Check possible
1831         cell pointers for 8-byte aligment and verify they are not 0.
1832
1833         * kjs/protected_values.cpp:
1834         (KJS::ProtectedValues::increaseProtectCount): Move null-tolerance from here...
1835         (KJS::ProtectedValues::decreaseProtectCount): ...and here...
1836         * kjs/protect.h:
1837         (KJS::gcProtectNullTolerant): ...to here...
1838         (KJS::gcUnprotectNullTolerant): ...and here, because not all callers need the null
1839         tolerance, and doing the check is expensive.
1840
1841         * kjs/protected_values.cpp:
1842         (KJS::ProtectedValues::computeHash): Replace hash function with a much faster one
1843         that is still very good.
1844
1845         * kjs/protect.h:
1846         (KJS::gcProtect):
1847         (KJS::gcUnprotect):
1848         (KJS::ProtectedValue::ProtectedValue):
1849         (KJS::ProtectedValue::~ProtectedValue):
1850         (KJS::ProtectedValue::operator=):
1851         (KJS::ProtectedObject::ProtectedObject):
1852         (KJS::ProtectedObject::~ProtectedObject):
1853         (KJS::ProtectedObject::operator=):
1854         (KJS::ProtectedReference::ProtectedReference):
1855         (KJS::ProtectedReference::~ProtectedReference):
1856         (KJS::ProtectedReference::operator=):
1857         * kjs/protected_values.cpp:
1858         (KJS::ProtectedValues::getProtectCount):
1859         (KJS::ProtectedValues::increaseProtectCount):
1860         (KJS::ProtectedValues::decreaseProtectCount):
1861         (KJS::ProtectedValues::computeHash):
1862         * bindings/runtime_root.cpp:
1863         (KJS::Bindings::addNativeReference):
1864         (KJS::Bindings::removeNativeReference):
1865         (RootObject::removeAllNativeReferences):
1866         * bindings/runtime_root.h:
1867         (KJS::Bindings::RootObject::~RootObject):
1868         (KJS::Bindings::RootObject::setRootObjectImp):
1869         * kjs/collector.cpp:
1870         (KJS::Collector::allocate):
1871         (KJS::Collector::collect):
1872         * kjs/collector.h:
1873         * kjs/internal.cpp:
1874         (NumberImp::create):
1875         (InterpreterImp::globalInit):
1876         (InterpreterImp::globalClear):
1877         (InterpreterImp::mark):
1878         * kjs/list.cpp:
1879         (KJS::List::derefValues):
1880         (KJS::List::refValues):
1881         (KJS::List::append):
1882         * kjs/object.cpp:
1883         (KJS::ObjectImp::setInternalValue):
1884         (KJS::ObjectImp::putDirect):
1885         * kjs/value.cpp:
1886         (ValueImp::mark):
1887         (ValueImp::marked):
1888         * kjs/value.h:
1889         (KJS::ValueImp::ValueImp):
1890         (KJS::ValueImp::~ValueImp):
1891         (KJS::ValueImp::):
1892         (KJS::Value::Value):
1893         (KJS::Value::~Value):
1894         (KJS::Value::operator=):
1895
1896 2004-04-30  Richard Williamson   <rjw@apple.com>
1897
1898         Asking an NSInvocation for it's return value when return type
1899         is void throws an exception.  Added check for void return types
1900         to avoid this exception.
1901
1902         Reviewed by Ken.
1903
1904         * bindings/objc/objc_instance.mm:
1905         (ObjcInstance::invokeMethod):
1906
1907 2004-04-29  Richard Williamson   <rjw@apple.com>
1908
1909         Fixed several bad problems with the ObjC bindings.  In particular, conversion
1910         to/from JavaScriptObject (soon to be WebScriptObject) was completely broken.
1911
1912         Reviewed by Chris.
1913
1914         * bindings/objc/objc_jsobject.h:
1915         * bindings/objc/objc_jsobject.mm:
1916         (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]):
1917         (-[JavaScriptObject KJS::]):
1918         (+[JavaScriptObject _convertValueToObjcValue:KJS::root:Bindings::]):
1919         (-[JavaScriptObject call:arguments:]):
1920         (-[JavaScriptObject evaluate:]):
1921         (-[JavaScriptObject getMember:]):
1922         (-[JavaScriptObject getSlot:]):
1923         * bindings/objc/objc_runtime.mm:
1924         (ObjcField::valueFromInstance):
1925         (ObjcField::setValueToInstance):
1926         * bindings/objc/objc_utility.mm:
1927         (KJS::Bindings::convertValueToObjcValue):
1928         (KJS::Bindings::convertObjcValueToValue):
1929         * bindings/runtime.h:
1930         * bindings/runtime_root.cpp:
1931         (KJS::Bindings::rootForInterpreter):
1932         (KJS::Bindings::addNativeReference):
1933         (KJS::Bindings::removeNativeReference):
1934         * bindings/runtime_root.h:
1935         * bindings/testbindings.mm:
1936         (-[MyFirstInterface logMessage:]):
1937         (-[MyFirstInterface setJSObject:]):
1938         (-[MyFirstInterface callJSObject::]):
1939
1940 2004-04-24  Darin Adler  <darin@apple.com>
1941
1942         Reviewed by Dave.
1943
1944         * kjs/ustring.cpp: (KJS::UString::append): Fix one case that was allocating a buffer
1945         that is 2x too big.
1946
1947 2004-04-23  Maciej Stachowiak  <mjs@apple.com>
1948
1949         Reviewed by Darin.
1950
1951         Implementation of conservative GC, based partly on code from
1952         Darin. It's turned off for now, so it shouldn't have any effect on
1953         the normal build.
1954         
1955         * JavaScriptCore.pbproj/project.pbxproj:
1956         * kjs/collector.cpp:
1957         (KJS::Collector::markStackObjectsConservatively):
1958         (KJS::Collector::markProtectedObjects):
1959         (KJS::Collector::collect):
1960         * kjs/collector.h:
1961         * kjs/protect.h:
1962         (KJS::gcProtect):
1963         (KJS::gcUnprotect):
1964         * kjs/protected_values.cpp: Added.
1965         (KJS::ProtectedValues::getProtectCount):
1966         (KJS::ProtectedValues::increaseProtectCount):
1967         (KJS::ProtectedValues::insert):
1968         (KJS::ProtectedValues::decreaseProtectCount):
1969         (KJS::ProtectedValues::expand):
1970         (KJS::ProtectedValues::shrink):
1971         (KJS::ProtectedValues::rehash):
1972         (KJS::ProtectedValues::computeHash):
1973         * kjs/protected_values.h: Added.
1974         * kjs/value.cpp:
1975         (ValueImp::useConservativeMark):
1976         (ValueImp::mark):
1977         (ValueImp::marked):
1978         * kjs/value.h:
1979         (KJS::ValueImp::):
1980
1981 === Safari-138 ===
1982
1983 2004-04-22  Richard Williamson   <rjw@apple.com>
1984
1985         Fixed build snafu (re-declaration of NPBool in npruntime.h and
1986         npapi.h).
1987
1988         * bindings/npruntime.h:
1989
1990 2004-04-22  Richard Williamson   <rjw@apple.com>
1991
1992         Updated plugin binding API to reflect latest revision from
1993         working group.
1994         
1995         Biggest change is the introduction of NPVariant used to represent
1996         value types.  NPVariant replaces the use of NPObject for the
1997         exchange of values between scripting environment and native code.
1998
1999         Reviewed by John.
2000
2001         * JavaScriptCore.pbproj/project.pbxproj:
2002         * bindings/NP_jsobject.cpp:
2003         (identiferFromNPIdentifier):
2004         (NPN_Call):
2005         (NPN_Evaluate):
2006         (NPN_GetProperty):
2007         (NPN_SetProperty):
2008         (NPN_ToString):
2009         (NPN_GetPropertyAtIndex):
2010         (NPN_SetPropertyAtIndex):
2011         * bindings/c/c_class.cpp:
2012         (CClass::methodsNamed):
2013         (CClass::fieldNamed):
2014         * bindings/c/c_instance.cpp:
2015         (CInstance::invokeMethod):
2016         (CInstance::defaultValue):
2017         * bindings/c/c_runtime.cpp:
2018         (CField::valueFromInstance):
2019         (CField::setValueToInstance):
2020         * bindings/c/c_utility.cpp:
2021         (convertNPStringToUTF16):
2022         (convertUTF8ToUTF16):
2023         (coerceValueToNPVariantStringType):
2024         (convertValueToNPVariant):
2025         (convertNPVariantToValue):
2026         * bindings/c/c_utility.h:
2027         * bindings/npruntime.cpp:
2028         (NPN_GetIdentifier):
2029         (NPN_GetIdentifiers):
2030         (NPN_UTF8FromIdentifier):
2031         (NPN_VariantIsVoid):
2032         (NPN_VariantIsNull):
2033         (NPN_VariantIsUndefined):
2034         (NPN_VariantIsBool):
2035         (NPN_VariantIsInt32):
2036         (NPN_VariantIsDouble):
2037         (NPN_VariantIsString):
2038         (NPN_VariantIsObject):
2039         (NPN_VariantToBool):
2040         (NPN_VariantToString):
2041         (NPN_VariantToInt32):
2042         (NPN_VariantToDouble):
2043         (NPN_VariantToObject):
2044         (NPN_InitializeVariantAsVoid):
2045         (NPN_InitializeVariantAsNull):
2046         (NPN_InitializeVariantAsUndefined):
2047         (NPN_InitializeVariantWithBool):
2048         (NPN_InitializeVariantWithInt32):
2049         (NPN_InitializeVariantWithDouble):
2050         (NPN_InitializeVariantWithString):
2051         (NPN_InitializeVariantWithStringCopy):
2052         (NPN_InitializeVariantWithObject):
2053         (NPN_InitializeVariantWithVariant):
2054         (NPN_ReleaseVariantValue):
2055         (NPN_CreateObject):
2056         (NPN_RetainObject):
2057         (NPN_ReleaseObject):
2058         (NPN_IsKindOfClass):
2059         (NPN_SetExceptionWithUTF8):
2060         (NPN_SetException):
2061         * bindings/npruntime.h:
2062         (_NPString::):
2063         (_NPString::_NPVariant::):
2064         * bindings/testbindings.cpp:
2065         (logMessage):
2066         (setDoubleValue):
2067         (setIntValue):
2068         (setStringValue):
2069         (setBooleanValue):
2070         (getDoubleValue):
2071         (getIntValue):
2072         (getStringValue):
2073         (getBooleanValue):
2074         (myGetProperty):
2075         (mySetProperty):
2076         (myInvoke):
2077         (myAllocate):
2078
2079 2004-04-22  Darin Adler  <darin@apple.com>
2080
2081         Reviewed by Maciej.
2082
2083         - fixed <rdar://problem/3627473>: "REGRESSION (125-137): memory trasher in UString::append, causing many different crashes"
2084
2085         * kjs/ustring.cpp:
2086         (KJS::UString::expandCapacity): Fix sizeof(UChar *) that should be sizeof(UChar).
2087         Was resulting in a buffer 2x the needed size.
2088         (KJS::UString::expandPreCapacity): Ditto.
2089         (KJS::UString::append): Fix malloc that is missing a sizeof(UChar).
2090
2091 2004-04-21  Maciej Stachowiak  <mjs@apple.com>
2092
2093         Reviewed by Darin.
2094
2095         Preliminary change for conservative GC. Create "protected"
2096         subclasses to GC-protect objects when on heap, since we will soon
2097         remove the built-in refcounting of the normal wrapper classes. Use
2098         them where needed.
2099         
2100         * JavaScriptCore.pbproj/project.pbxproj:
2101         * kjs/context.h:
2102         * kjs/internal.h:
2103         (KJS::InterpreterImp::globalObject):
2104         * kjs/interpreter.h:
2105         * kjs/property_map.cpp:
2106         * kjs/reference.h:
2107         * kjs/reference_list.cpp:
2108
2109 2004-04-19  Maciej Stachowiak  <mjs@apple.com>
2110
2111         Reviewed by Dave.
2112
2113         Optimize prepend using the shared substring optimization. Also,
2114         limit the applicability of shared append and shared prepend. If
2115         you overdo it, it does more harm than good, because you create a
2116         bunch of strings that are disqualified from future shared
2117         append/prepend, for not much immediate savings in allocate/copy
2118         expense.
2119         
2120         * kjs/ustring.cpp:
2121         (KJS::):
2122         (KJS::UString::Rep::create):
2123         (KJS::UString::expandedSize):
2124         (KJS::UString::usedPreCapacity):
2125         (KJS::UString::expandCapacity):
2126         (KJS::UString::expandPreCapacity):
2127         (KJS::UString::UString):
2128         (KJS::UString::append):
2129         (KJS::UString::operator=):
2130         * kjs/ustring.h:
2131         (KJS::UString::Rep::data):
2132
2133 2004-04-16  Maciej Stachowiak  <mjs@apple.com>
2134         Reviewed by Richard.
2135
2136         No more need for Completion or Reference to privately inherit from
2137         Value, none of the superclass functionality is used.
2138
2139         * kjs/completion.h:
2140         * kjs/reference.h:
2141
2142 === Safari-137 ===
2143
2144 2004-04-16  Richard Williamson   <rjw@apple.com>
2145
2146         Added interpreter lock protection around object creation.
2147
2148         Reviewed by Chris.
2149
2150         * bindings/runtime.cpp:
2151         (Instance::createRuntimeObject):
2152
2153 2004-04-16  Maciej Stachowiak  <mjs@apple.com>
2154
2155         Reviewed by Ken.
2156
2157         Another JavaScript speed improvement: use the mechanism from
2158         string append optimization to make taking a substring fast, again
2159         sharing the buffer.
2160
2161         A further 22% improvement on the 24fun string speed test.
2162         
2163         * kjs/ustring.cpp:
2164         (KJS::):
2165         (KJS::UString::Rep::create):
2166         (KJS::UString::UString):
2167         (KJS::UString::append):
2168         (KJS::UString::operator=):
2169         (KJS::UString::substr):
2170         * kjs/ustring.h:
2171         (KJS::UString::Rep::data):
2172
2173 2004-04-13  Maciej Stachowiak  <mjs@apple.com>
2174
2175         Reviewed by Darin.
2176
2177         - fixed <rdar://problem/3600695>: String manipulation in JavaScript 24fun test is very slow (slow)
2178         - fixed <rdar://problem/3600691>: Table generation test is really slow
2179         - fixed <rdar://problem/3600661>: 24fun date test is really slow
2180
2181         80% speedup on the string test, lesser speedups on the other two.
2182         
2183         Two different optimizations here:
2184
2185         1) Avoid large overhead of scanning strings to see if they are all
2186         ASCII before numeric conversion.
2187         
2188         * kjs/nodes.cpp:
2189         (AssignNode::evaluate): Don't convert to integer until we know for
2190         sure the operation will need it. Attempting to convert strings to
2191         numbers is a waste when they are being appended with +=.
2192
2193         2) Avoid huge cost of appending strings.
2194
2195         This is done by allowing multiple strings to share a buffer but
2196         actually use different ranges of it. The first time a string is
2197         appended to, we start leaving at least 10% extra space in the
2198         buffer, so doing N appends to the same string takes O(log N)
2199         mallocs instead of O(N).
2200         
2201         * kjs/identifier.cpp:
2202         (KJS::Identifier::equal):
2203         (KJS::Identifier::add):
2204         * kjs/ustring.cpp:
2205         (KJS::):
2206         (KJS::UCharReference::operator=):
2207         (KJS::UCharReference::ref):
2208         (KJS::UString::Rep::create):
2209         (KJS::UString::Rep::destroy):
2210         (KJS::UString::expandedSize):
2211         (KJS::UString::usedCapacity):
2212         (KJS::UString::expandCapacity):
2213         (KJS::UString::UString):
2214         (KJS::UString::null):
2215         (KJS::UString::append):
2216         (KJS::UString::operator=):
2217         (KJS::UString::toStrictUInt32):
2218         (KJS::UString::detach):
2219         (KJS::KJS::operator==):
2220         * kjs/ustring.h:
2221         (KJS::UString::Rep::data):
2222         (KJS::UString::Rep::hash):
2223
2224 2004-04-09  Maciej Stachowiak  <mjs@apple.com>
2225
2226         Reviewed by John.
2227
2228         - fix deployment build by avoiding deployment-only warning.
2229
2230         * kjs/scope_chain.cpp:
2231         (KJS::ScopeChain::bottom):
2232
2233 2004-04-09  Maciej Stachowiak  <mjs@apple.com>
2234
2235         Reviewed by John.
2236
2237         Changed things so that newly created objects get a prototype based
2238         on the scope chain of the current function, rather than the
2239         interpreter that started execution. This fixes the following bugs:
2240         
2241         <rdar://problem/3368523>: ARCH: wrong prototype used to create new objects (hang on lookup.atomica.com)
2242         <rdar://problem/3559173>: ARCH: Cannot scan using a HP Jetdirect product (JS object prototypes bind incorrectly)
2243
2244         * JavaScriptCore.pbproj/project.pbxproj:
2245         * kjs/array_object.cpp:
2246         (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments):
2247         (ArrayProtoFuncImp::ArrayProtoFuncImp):
2248         (ArrayProtoFuncImp::call):
2249         (ArrayObjectImp::construct):
2250         * kjs/bool_object.cpp:
2251         (BooleanObjectImp::construct):
2252         * kjs/date_object.cpp:
2253         (DateProtoFuncImp::DateProtoFuncImp):
2254         (DateProtoFuncImp::call):
2255         (DateObjectImp::construct):
2256         * kjs/error_object.cpp:
2257         (ErrorObjectImp::construct):
2258         * kjs/function.cpp:
2259         (FunctionImp::FunctionImp):
2260         (FunctionImp::call):
2261         (DeclaredFunctionImp::construct):
2262         (ArgumentsImp::ArgumentsImp):
2263         (GlobalFuncImp::call):
2264         * kjs/function_object.cpp:
2265         (FunctionProtoFuncImp::call):
2266         (FunctionObjectImp::construct):
2267         * kjs/internal.cpp:
2268         (BooleanImp::toObject):
2269         (StringImp::toObject):
2270         (NumberImp::toObject):
2271         (InterpreterImp::InterpreterImp):
2272         (InterpreterImp::clear):
2273         (InterpreterImp::interpreterWithGlobalObject):
2274         * kjs/internal.h:
2275         * kjs/interpreter.cpp:
2276         (ExecState::lexicalInterpreter):
2277         * kjs/interpreter.h:
2278         (KJS::ExecState::dynamicInterpreter):
2279         (KJS::ExecState::interpreter):
2280         * kjs/math_object.cpp:
2281         (MathFuncImp::MathFuncImp):
2282         * kjs/nodes.cpp:
2283         (StatementNode::hitStatement):
2284         (StatementNode::abortStatement):
2285         (RegExpNode::evaluate):
2286         (ElementNode::evaluate):
2287         (ArrayNode::evaluate):
2288         (ObjectLiteralNode::evaluate):
2289         (PropertyValueNode::evaluate):
2290         (FunctionCallNode::evaluate):
2291         (FuncDeclNode::processFuncDecl):
2292         (FuncExprNode::evaluate):
2293         * kjs/number_object.cpp:
2294         (NumberObjectImp::construct):
2295         * kjs/object.cpp:
2296         (KJS::ObjectImp::defaultValue):
2297         (KJS::Error::create):
2298         * kjs/object_object.cpp:
2299         (ObjectObjectImp::construct):
2300         * kjs/reference.cpp:
2301         (Reference::putValue):
2302         * kjs/regexp_object.cpp:
2303         (RegExpProtoFuncImp::call):
2304         (RegExpObjectImp::arrayOfMatches):
2305         (RegExpObjectImp::construct):
2306         * kjs/scope_chain.cpp:
2307         (KJS::ScopeChain::bottom):
2308         * kjs/scope_chain.h:
2309         * kjs/string_object.cpp:
2310         (StringProtoFuncImp::StringProtoFuncImp):
2311         (StringProtoFuncImp::call):
2312         (StringObjectImp::construct):
2313
2314 === Safari-136 ===
2315
2316 === Safari-135 ===
2317
2318 2004-03-31  Richard Williamson   <rjw@apple.com>
2319
2320         Tedious renames based on feedback from plugin-futures list.
2321         NP_ functions are renamed with NPN_ prefix.
2322         Types prefix renamed from NP_ to NP.
2323         NPN_CreateStringWithUTF8 and NPN_SetExceptionWithUTF8 now take a length, optionally -1 if string is null terminated. 
2324         
2325         No review because this was just a renaming patch.
2326
2327         * bindings/NP_jsobject.cpp:
2328         (listFromNPArray):
2329         (jsAllocate):
2330         (identiferFromNPIdentifier):
2331         (NPN_Call):
2332         (NPN_Evaluate):
2333         (NPN_GetProperty):
2334         (NPN_SetProperty):
2335         (NPN_RemoveProperty):
2336         (NPN_ToString):
2337         (NPN_GetPropertyAtIndex):
2338         (NPN_SetPropertyAtIndex):
2339         * bindings/NP_jsobject.h:
2340         * bindings/c/c_class.cpp:
2341         (CClass::_commonInit):
2342         (CClass::classForIsA):
2343         (CClass::CClass):
2344         (CClass::methodsNamed):
2345         (CClass::fieldNamed):
2346         * bindings/c/c_class.h:
2347         * bindings/c/c_instance.cpp:
2348         (CInstance::CInstance):
2349         (CInstance::~CInstance):
2350         (CInstance::operator=):
2351         (CInstance::invokeMethod):
2352         (CInstance::defaultValue):
2353         * bindings/c/c_instance.h:
2354         (KJS::Bindings::CInstance::getObject):
2355         * bindings/c/c_runtime.cpp:
2356         (CField::valueFromInstance):
2357         (CField::setValueToInstance):
2358         * bindings/c/c_runtime.h:
2359         (KJS::Bindings::CField::CField):
2360         (KJS::Bindings::CField::name):
2361         (KJS::Bindings::CMethod::CMethod):
2362         (KJS::Bindings::CMethod::name):
2363         * bindings/c/c_utility.cpp:
2364         (coerceValueToNPString):
2365         (convertValueToNPValueType):
2366         (convertNPValueTypeToValue):
2367         * bindings/c/c_utility.h:
2368         * bindings/npruntime.cpp:
2369         (NPN_IdentifierFromUTF8):
2370         (NPN_IsValidIdentifier):
2371         (NPN_GetIdentifiers):
2372         (NPN_UTF8FromIdentifier):
2373         (NPN_CreateObject):
2374         (NPN_RetainObject):
2375         (NPN_ReleaseObject):
2376         (NPN_IsKindOfClass):
2377         (NPN_SetExceptionWithUTF8):
2378         (NPN_SetException):
2379         (numberAllocate):
2380         (NPN_CreateNumberWithInt):
2381         (NPN_CreateNumberWithFloat):
2382         (NPN_CreateNumberWithDouble):
2383         (NPN_IntFromNumber):
2384         (NPN_FloatFromNumber):
2385         (NPN_DoubleFromNumber):
2386         (stringAllocate):
2387         (NPN_CreateStringWithUTF8):
2388         (NPN_CreateStringWithUTF16):
2389         (NPN_DeallocateUTF8):
2390         (NPN_UTF8FromString):
2391         (NPN_UTF16FromString):
2392         (NPN_StringLength):
2393         (booleanAllocate):
2394         (NPN_CreateBoolean):
2395         (NPN_BoolFromBoolean):
2396         (nullAllocate):
2397         (NPN_GetNull):
2398         (undefinedAllocate):
2399         (NPN_GetUndefined):
2400         (arrayAllocate):
2401         (arrayDeallocate):
2402         (NPN_CreateArray):
2403         (NPN_CreateArrayV):
2404         (NPN_ObjectAtIndex):
2405         * bindings/npruntime.h:
2406         * bindings/runtime.cpp:
2407         (Instance::createBindingForLanguageInstance):
2408         * bindings/testbindings.cpp:
2409         (initializeIdentifiers):
2410         (myHasProperty):
2411         (myHasMethod):
2412         (myGetProperty):
2413         (mySetProperty):
2414         (logMessage):
2415         (setDoubleValue):
2416         (setIntValue):
2417         (setStringValue):
2418         (setBooleanValue):
2419         (getDoubleValue):
2420         (getIntValue):
2421         (getStringValue):
2422         (getBooleanValue):
2423         (myInvoke):
2424         (myAllocate):
2425         (myInvalidate):
2426         (myDeallocate):
2427         (main):
2428
2429 2004-03-31  Richard Williamson   <rjw@apple.com>
2430
2431         Changed references to NP_runtime.h to npruntime.h
2432         
2433         * JavaScriptCore.pbproj/project.pbxproj:
2434         * bindings/NP_jsobject.h:
2435         * bindings/c/c_class.h:
2436         * bindings/c/c_instance.h:
2437         * bindings/c/c_runtime.h:
2438         * bindings/c/c_utility.h:
2439         * bindings/npruntime.cpp:
2440
2441 2004-03-31  Richard Williamson   <rjw@apple.com>
2442
2443         Renamed NP_runtime.h to npruntime.h to match Netscape SDK.
2444
2445         * JavaScriptCore.pbproj/project.pbxproj:
2446         * bindings/NP_jsobject.h:
2447         * bindings/npruntime.cpp:
2448
2449 === Safari-134 ===
2450
2451 2004-03-23  Richard Williamson   <rjw@apple.com>
2452
2453         Added implementation of KJS::Value <-> NP_Object conversion functions.
2454         Augmented test program for 'C' bindings.
2455         Added asserts and parameter checking to all public API.        
2456
2457         Reviewed by Ken.
2458
2459         * JavaScriptCore.pbproj/project.pbxproj:
2460         * bindings/NP_jsobject.cpp:
2461         (NP_ToString):
2462         * bindings/NP_jsobject.h: Added.
2463         * bindings/NP_runtime.cpp:
2464         (NP_IdentifierFromUTF8):
2465         (NP_IsValidIdentifier):
2466         (NP_GetIdentifiers):
2467         (NP_CreateObject):
2468         (NP_RetainObject):
2469         (NP_ReleaseObject):
2470         (NP_IsKindOfClass):
2471         (NP_SetExceptionWithUTF8):
2472         (NP_SetException):
2473         (NP_IntFromNumber):
2474         (NP_FloatFromNumber):
2475         (NP_DoubleFromNumber):
2476         (NP_CreateStringWithUTF8):
2477         (NP_CreateStringWithUTF16):
2478         (NP_DeallocateUTF8):
2479         (NP_UTF8FromString):
2480         (NP_UTF16FromString):
2481         (NP_StringLength):
2482         (NP_BoolFromBoolean):
2483         * bindings/NP_runtime.h:
2484         * bindings/c/c_instance.cpp:
2485         (CInstance::invokeMethod):
2486         * bindings/c/c_utility.cpp:
2487         (coerceValueToNPString):
2488         (convertValueToNPValueType):
2489         (convertNPValueTypeToValue):
2490         * bindings/c/c_utility.h:
2491         * bindings/test.js:
2492         * bindings/testC.js: Added.
2493         * bindings/testbindings.cpp:
2494         (logMessage):
2495         (setDoubleValue):
2496         (setIntValue):
2497         (setStringValue):
2498         (setBooleanValue):
2499         (getDoubleValue):
2500         (getIntValue):
2501         (getStringValue):
2502         (getBooleanValue):
2503         (myInterfaceInvoke):
2504         (myInterfaceAllocate):
2505
2506 === Safari-133 ===
2507
2508 2004-03-19  Darin Adler  <darin@apple.com>
2509
2510         Reviewed by Ken.
2511
2512         - fixed problem with methods like setUTCHour
2513
2514         * kjs/date_object.cpp: (DateProtoFuncImp::call): Fix conversion back to time_t to use the appropriate
2515         GMT vs. local time function based on the utc flag.
2516
2517 2004-03-17  Richard Williamson   <rjw@apple.com>
2518
2519         Added a context parameter to result callbacks use by JavaScriptObject functions.  This was a change requested by Eric Carlson on the QT plugin team.
2520
2521         Reviewed by Ken.
2522
2523         * bindings/NP_jsobject.cpp:
2524         (NP_Call):
2525         (NP_Evaluate):
2526         (NP_GetProperty):
2527         (NP_ToString):
2528         (NP_GetPropertyAtIndex):
2529         * bindings/NP_runtime.h:
2530
2531 2004-03-16  Richard Williamson   <rjw@apple.com>
2532
2533         Fixed 3590169.  Regression (crash) caused by the switch to MethodLists.  Crash when attempting to invoke a method from JavaScript to Java that is not implemented.
2534
2535         Reviewed by John.
2536
2537         * bindings/jni/jni_class.cpp:
2538         (JavaClass::methodsNamed):
2539
2540 2004-03-15  Richard Williamson   <rjw@apple.com>
2541
2542         Fixed 3570854.  Don't attempt to convert Null to strings.  We
2543         were incorrectly converting to "Null".
2544
2545         Actually fixed by Scott Kovatch.
2546
2547         Reviewed by Richard.
2548
2549         * bindings/jni/jni_utility.cpp:
2550         (KJS::Bindings::convertValueToJValue):
2551
2552 === Safari-132 ===
2553
2554 2004-03-11  Richard Williamson   <rjw@apple.com>
2555
2556         Stitched together the NP stuff to our language independent
2557         JavaScript binding stuff.  Very close to being done.
2558         
2559         Added program to test C bindings (and NP stuff).  Just tests
2560         properties.  Will add methods and JavaScript access, etc.
2561
2562         Updated Makefile.am to account for new bindings/c directory.
2563
2564         Change NP_UTF8 from "const char *" to "char" to allow for
2565         declarations like "const NP_UTF8 *" and "NP_UTF8 *".  Ditto
2566         for NP_UTF16.
2567
2568         Added NP_IsValidIdentifier().
2569
2570         Reviewed by Chris.
2571
2572         * JavaScriptCore.pbproj/project.pbxproj:
2573         * Makefile.am:
2574         * bindings/NP_jsobject.cpp:
2575         (identiferFromNPIdentifier):
2576         (NP_Evaluate):
2577         * bindings/NP_runtime.cpp:
2578         (NP_IdentifierFromUTF8):
2579         (NP_IsValidIdentifier):
2580         (NP_GetIdentifiers):
2581         (NP_UTF8FromIdentifier):
2582         (NP_SetExceptionWithUTF8):
2583         (NP_SetException):
2584         (NP_CreateStringWithUTF8):
2585         (NP_CreateStringWithUTF16):
2586         (NP_UTF8FromString):
2587         (NP_UTF16FromString):
2588         * bindings/NP_runtime.h:
2589         * bindings/c/c_class.cpp: Added.
2590         (CClass::_commonDelete):
2591         (CClass::_commonCopy):
2592         (CClass::_commonInit):
2593         (_createClassesByIsAIfNecessary):
2594         (CClass::classForIsA):
2595         (CClass::CClass):
2596         (CClass::name):
2597         (CClass::methodsNamed):
2598         (CClass::fieldNamed):
2599         * bindings/c/c_class.h: Added.
2600         (KJS::Bindings::CClass::~CClass):
2601         (KJS::Bindings::CClass::CClass):
2602         (KJS::Bindings::CClass::operator=):
2603         (KJS::Bindings::CClass::constructorAt):
2604         (KJS::Bindings::CClass::numConstructors):
2605         * bindings/c/c_instance.cpp: Added.
2606         (CInstance::CInstance):
2607         (CInstance::~CInstance):
2608         (CInstance::operator=):
2609         (CInstance::getClass):
2610         (CInstance::begin):
2611         (CInstance::end):
2612         (CInstance::invokeMethod):
2613         (CInstance::defaultValue):
2614         (CInstance::stringValue):
2615         (CInstance::numberValue):
2616         (CInstance::booleanValue):
2617         (CInstance::valueOf):
2618         * bindings/c/c_instance.h: Added.
2619         (KJS::Bindings::CInstance::getObject):
2620         * bindings/c/c_runtime.cpp: Added.
2621         (CField::valueFromInstance):
2622         (CField::setValueToInstance):
2623         * bindings/c/c_runtime.h: Added.
2624         (KJS::Bindings::CField::CField):
2625         (KJS::Bindings::CField::name):
2626         (KJS::Bindings::CField::type):
2627         (KJS::Bindings::CMethod::CMethod):
2628         (KJS::Bindings::CMethod::name):
2629         (KJS::Bindings::CMethod::numParameters):
2630         * bindings/c/c_utility.cpp: Added.
2631         (coerceValueToNPValueType):
2632         (convertValueToNPValueType):
2633         (convertNPValueTypeToValue):
2634         * bindings/c/c_utility.h: Added.
2635         * bindings/make_testbindings:
2636         * bindings/runtime.cpp:
2637         (Instance::createBindingForLanguageInstance):
2638         * bindings/runtime.h:
2639         (KJS::Bindings::Instance::):
2640         * bindings/testbindings.cpp: Added.
2641         (initializeIdentifiers):
2642         (myInterfaceHasProperty):
2643         (myInterfaceHasMethod):
2644         (myInterfaceGetProperty):
2645         (myInterfaceSetProperty):
2646         (myInterfaceInvoke):
2647         (myInterfaceAllocate):
2648         (myInterfaceInvalidate):
2649         (myInterfaceDeallocate):
2650         (GlobalImp::className):
2651         (readJavaScriptFromFile):
2652         (main):
2653
2654 2004-03-10  Richard Williamson   <rjw@apple.com>
2655
2656         Made changes to support new asychronous approach to calls from
2657         plugin to JavaScript
2658
2659         Reviewed by Chris.
2660
2661         * bindings/NP_jsobject.cpp:
2662         (NP_Call):
2663         (NP_Evaluate):
2664         (NP_GetProperty):
2665         (NP_ToString):
2666         (NP_GetPropertyAtIndex):
2667         * bindings/NP_runtime.h:
2668         * bindings/make_testbindings:
2669         * bindings/runtime.cpp:
2670         (Instance::createBindingForLanguageInstance):
2671
2672 2004-03-10  Richard Williamson   <rjw@apple.com>
2673
2674         Updated header to include proposed changes from
2675         plugin-futures list.  Calls from plugin to JavaScript
2676         are now asynchronous.
2677
2678         Reviewed by Chris.
2679
2680         * bindings/NP_runtime.h:
2681
2682 === Safari-131 ===
2683
2684 2004-03-04  Richard Williamson   <rjw@apple.com>
2685
2686         Implementation of NP_JavaScriptObject.  This is the 'C' class
2687         that wraps a JavaScript object.
2688
2689         Reviewed by Chris.
2690
2691         * JavaScriptCore.pbproj/project.pbxproj:
2692         * bindings/NP_jsobject.cpp: Added.
2693         (coerceValueToNPValueType):
2694         (convertValueToNPValueType):
2695         (convertNPValueTypeToValue):
2696         (listFromNPArray):
2697         (jsAllocate):
2698         (jsDeallocate):
2699         (identiferFromNPIdentifier):
2700         (NP_Call):
2701         (NP_Evaluate):
2702         (NP_GetProperty):
2703         (NP_SetProperty):
2704         (NP_RemoveProperty):
2705         (NP_ToString):
2706         (NP_GetPropertyAtIndex):
2707         (NP_SetPropertyAtIndex):
2708         * bindings/NP_runtime.cpp:
2709         (NP_ObjectAtIndex):
2710         * bindings/NP_runtime.h:
2711         * bindings/runtime_object.h:
2712
2713 2004-03-04  Richard Williamson   <rjw@apple.com>
2714
2715         Added NP_Array implementation.  
2716
2717         Changed NP_Boolean to just depend on two static instances, no
2718         space is required for values.
2719
2720         Reviewed by Chris.
2721
2722         * bindings/NP_runtime.cpp:
2723         (NP_CreateBoolean):
2724         (NP_BoolFromBoolean):
2725         (arrayAllocate):
2726         (arrayDeallocate):
2727         (NP_CreateArray):
2728         (NP_CreateArrayV):
2729         (NP_ObjectAtIndex):
2730         * bindings/NP_runtime.h:
2731
2732 2004-03-03  Darin Adler  <darin@apple.com>
2733
2734         Reviewed by Vicki.
2735
2736         * English.lproj/InfoPlist.strings: Removed. No need to localize the version and
2737         copyright string, and that's all that was in here.
2738         * JavaScriptCore.pbproj/project.pbxproj: Removed InfoPlist.strings from build.
2739
2740 2004-03-03  Richard Williamson   <rjw@apple.com>
2741
2742         More 'C' binding implementation.  Fleshed out all the
2743         'primitive' data types.
2744
2745         Reviewed by Chris.
2746
2747         * bindings/NP_runtime.cpp:
2748         (NP_ReleaseObject):
2749         (numberAllocate):
2750         (stringAllocate):
2751         (stringDeallocate):
2752         (NP_CreateStringWithUTF8):
2753         (NP_CreateStringWithUTF16):
2754         (NP_UTF8FromString):
2755         (NP_UTF16FromString):
2756         (NP_StringLength):
2757         (booleanAllocate):
2758         (booleanDeallocate):
2759         (NP_CreateBoolean):
2760         (NP_BoolFromBoolean):
2761         (nullAllocate):
2762         (nullDeallocate):
2763         (NP_GetNull):
2764         (undefinedAllocate):
2765         (undefinedDeallocate):
2766         (NP_GetUndefined):
2767         * bindings/NP_runtime.h:
2768
2769 2004-03-03  Richard Williamson   <rjw@apple.com>
2770
2771         More 'C' binding implementation.
2772
2773         Reviewed by Chris.
2774
2775         * bindings/NP_runtime.cpp:
2776         (identifierEqual):
2777         (identifierHash):
2778         (getIdentifierDictionary):
2779         (NP_IdentifierFromUTF8):
2780         (NP_UTF8FromIdentifier):
2781         (NP_CreateObject):
2782         (NP_ReleaseObject):
2783         (NP_IsKindOfClass):
2784         (numberCreate):
2785         (NP_CreateNumberWithInt):
2786         (NP_CreateNumberWithFloat):
2787         (NP_CreateNumberWithDouble):
2788         (NP_IntFromNumber):
2789         (NP_FloatFromNumber):
2790         (NP_DoubleFromNumber):
2791         * bindings/NP_runtime.h:
2792
2793 2004-03-02  Richard Williamson   <rjw@apple.com>
2794
2795         Removed retain/release from NP_Class.  Classes will not be allowed to implement their
2796         own customer retain/release scheme.
2797
2798         Reviewed by Chris.
2799
2800         * bindings/NP_runtime.cpp:
2801         (NP_RetainObject):
2802         (NP_ReleaseObject):
2803         * bindings/NP_runtime.h:
2804
2805 2004-03-02  Richard Williamson   <rjw@apple.com>
2806
2807         C binding API.  Partial implementation.
2808
2809         Completed ObjectiveC bindings (not based on the C API).  These will re-implemented over the C binding API, but I wanted to get this code in the tree.
2810
2811         Factored root object reference counting scheme.  It is now useful independent
2812         of LiveConnect.
2813
2814         Reviewed by Chris.
2815
2816         * JavaScriptCore.pbproj/project.pbxproj:
2817         * bindings/NP_runtime.cpp: Added.
2818         (NP_IdentifierFromUTF8):
2819         (NP_GetIdentifiers):
2820         (NP_UTF8FromIdentifier):
2821         (NP_CreateObject):
2822         (NP_RetainObject):
2823         (NP_ReleaseObject):
2824         (NP_IsKindOfClass):
2825         (NP_SetException):
2826         (NP_Call):
2827         (NP_Evaluate):
2828         (NP_GetProperty):
2829         (NP_SetProperty):
2830         (NP_RemoveProperty):
2831         (NP_ToString):
2832         (NP_GetPropertyAtIndex):
2833         (NP_SetPropertyAtIndex):
2834         (NP_CreateNumberWithInt):
2835         (NP_CreateNumberWithFloat):
2836         (NP_CreateNumberWithDouble):
2837         (NP_IntFromNumber):
2838         (NP_FloatFromNumber):
2839         (NP_DoubleFromNumber):
2840         (NP_CreateStringWithUTF8):
2841         (NP_CreateStringWithUTF16):
2842         (NP_UTF8FromString):
2843         (NP_UTF16FromString):
2844         (NP_CreateBoolean):
2845         (NP_BoolFromBoolean):
2846         (NP_GetNull):
2847         (NP_GetUndefined):
2848         (NP_CreateArray):
2849         (NP_CreateArrayV):
2850         (NP_ObjectAtIndex):
2851         * bindings/NP_runtime.h: Added.
2852         * bindings/jni/jni_jsobject.cpp:
2853         (JSObject::invoke):
2854         (JSObject::finalize):
2855         (JSObject::createNative):
2856         (JSObject::convertValueToJObject):
2857         * bindings/jni/jni_jsobject.h:
2858         * bindings/objc/objc_jsobject.h:
2859         * bindings/objc/objc_jsobject.mm:
2860         (rootForView):
2861         (windowJavaScriptObject):
2862         (-[JavaScriptObject initWithObjectImp:KJS::root:Bindings::]):
2863         (-[JavaScriptObject dealloc]):
2864         (-[JavaScriptObject _convertValueToObjcValue:KJS::]):
2865         (-[JavaScriptObject call:arguments:]):
2866         (-[JavaScriptObject evaluate:]):
2867         (-[JavaScriptObject getMember:]):
2868         (-[JavaScriptObject setMember:value:]):
2869         (-[JavaScriptObject removeMember:]):
2870         (-[JavaScriptObject toString]):
2871         (-[JavaScriptObject getSlot:]):
2872         (-[JavaScriptObject setSlot:value:]):
2873         * bindings/objc/objc_utility.h:
2874         * bindings/objc/objc_utility.mm:
2875         (KJS::Bindings::convertValueToObjcValue):
2876         * bindings/runtime_root.cpp: Added.
2877         (getReferencesByRootDictionary):
2878         (getReferencesDictionary):
2879         (KJS::Bindings::findReferenceDictionary):
2880         (KJS::Bindings::rootForImp):
2881         (KJS::Bindings::addNativeReference):
2882         (KJS::Bindings::removeNativeReference):
2883         (completedJavaScriptAccess):
2884         (initializeJavaScriptAccessLock):
2885         (lockJavaScriptAccess):
2886         (unlockJavaScriptAccess):
2887         (RootObject::dispatchToJavaScriptThread):
2888         (performJavaScriptAccess):
2889         (RootObject::setFindRootObjectForNativeHandleFunction):
2890         (RootObject::removeAllNativeReferences):
2891         * bindings/runtime_root.h: Added.
2892         (KJS::Bindings::RootObject::RootObject):
2893         (KJS::Bindings::RootObject::~RootObject):
2894         (KJS::Bindings::RootObject::setRootObjectImp):
2895         (KJS::Bindings::RootObject::rootObjectImp):
2896         (KJS::Bindings::RootObject::setInterpreter):
2897         (KJS::Bindings::RootObject::interpreter):
2898         (KJS::Bindings::RootObject::findRootObjectForNativeHandleFunction):
2899         (KJS::Bindings::RootObject::runLoop):
2900         (KJS::Bindings::RootObject::performJavaScriptSource):
2901
2902 === Safari-130 ===
2903
2904 === Safari-129 ===
2905
2906 2004-02-18  Richard Williamson   <rjw@apple.com>
2907
2908         Added NSNumber/Number conversion.
2909
2910         Removed some unnecessary KJS:: namespace specifiers.
2911
2912         Reviewed by Ken.
2913
2914         * bindings/objc/objc_utility.mm:
2915         (KJS::Bindings::convertValueToObjcValue):
2916         (KJS::Bindings::convertObjcValueToValue):
2917         * bindings/runtime_array.h:
2918
2919 2004-02-18  Richard Williamson   <rjw@apple.com>
2920
2921         Added support for export NSArrays.
2922
2923         Updated valueAt() to take an ExecState so we can throw
2924         JS exceptions.
2925
2926         Implemented excludeSelectorFromJavaScript: in ObjcClass.  This allows
2927         ObjectiveC classes to control the visibility of their methods in 
2928         JavaScript.
2929
2930         Reviewed by Ken.
2931
2932         * bindings/jni/jni_runtime.cpp:
2933         (JavaField::valueFromInstance):
2934         (JavaArray::valueAt):
2935         * bindings/jni/jni_runtime.h:
2936         * bindings/objc/objc_class.mm:
2937         (ObjcClass::methodsNamed):
2938         * bindings/objc/objc_runtime.h:
2939         (KJS::Bindings::ObjcArray::getObjcArray):
2940         * bindings/objc/objc_runtime.mm:
2941         (ObjcField::valueFromInstance):
2942         (ObjcField::setValueToInstance):
2943         (ObjcArray::ObjcArray):
2944         (ObjcArray::~ObjcArray):
2945         (ObjcArray::operator=):
2946         (ObjcArray::setValueAt):
2947         (ObjcArray::valueAt):
2948         (ObjcArray::getLength):
2949         * bindings/objc/objc_utility.mm:
2950         (KJS::Bindings::convertValueToObjcValue):
2951         (KJS::Bindings::convertObjcValueToValue):
2952         * bindings/runtime.cpp:
2953         (Instance::getValueOfField):
2954         * bindings/runtime.h:
2955         * bindings/runtime_array.cpp:
2956         (RuntimeArrayImp::get):
2957         * bindings/runtime_object.cpp:
2958         (RuntimeObjectImp::get):
2959
2960 2004-02-17  Richard Williamson   <rjw@apple.com>
2961
2962         Added String <-> NSString conversion.
2963         Added tests of String <-> NSString conversion to test program.
2964
2965         Reviewed by Chris.
2966
2967         * bindings/objc/objc_utility.mm:
2968         (KJS::Bindings::convertValueToObjcValue):
2969         (KJS::Bindings::convertObjcValueToValue):
2970         * bindings/test.js:
2971         * bindings/testbindings.mm:
2972         (-[MyFirstInterface getString]):
2973
2974 2004-02-15  Darin Adler  <darin@apple.com>
2975
2976         Reviewed by Dave.
2977
2978         * JavaScriptCore.pbproj/project.pbxproj: Tweak build styles a bit, fixing OptimizedWithSymbols,
2979         and removing redundant settings of things that match defaults in other build styles.
2980
2981 2004-02-13  Richard Williamson   <rjw@apple.com>
2982
2983         Work towards the JavaScript ObjC bindings.  The bindings now work for 
2984         simple scalar types.  testbindings.mm is an illustration of how the 
2985         bindings work.
2986
2987         Reviewed by Ken.
2988
2989         * JavaScriptCore.pbproj/project.pbxproj:
2990         * Makefile.am:
2991         * bindings/jni/jni_class.cpp:
2992         (JavaClass::methodsNamed):
2993         * bindings/jni/jni_class.h:
2994         * bindings/jni/jni_instance.cpp:
2995         (JavaInstance::invokeMethod):
2996         * bindings/jni/jni_instance.h:
2997         * bindings/jni/jni_runtime.h:
2998         (KJS::Bindings::JavaMethod::returnType):
2999         * bindings/make_testbindings: Added.
3000         * bindings/objc/objc_class.h: Added.
3001         (KJS::Bindings::ObjcClass::~ObjcClass):
3002         (KJS::Bindings::ObjcClass::ObjcClass):
3003         (KJS::Bindings::ObjcClass::operator=):
3004         (KJS::Bindings::ObjcClass::constructorAt):
3005         (KJS::Bindings::ObjcClass::numConstructors):
3006         * bindings/objc/objc_class.mm: Added.
3007         (ObjcClass::_commonDelete):
3008         (ObjcClass::_commonCopy):
3009         (ObjcClass::_commonInit):
3010         (_createClassesByIsAIfNecessary):
3011         (ObjcClass::classForIsA):
3012         (ObjcClass::ObjcClass):
3013         (ObjcClass::name):
3014         (ObjcClass::methodsNamed):
3015         (ObjcClass::fieldNamed):
3016         * bindings/objc/objc_header.h: Added.
3017         * bindings/objc/objc_instance.h: Added.
3018         (KJS::Bindings::ObjcInstance::getObject):
3019         * bindings/objc/objc_instance.mm: Added.
3020         (ObjcInstance::ObjcInstance):
3021         (ObjcInstance::~ObjcInstance):
3022         (ObjcInstance::operator=):
3023         (ObjcInstance::begin):
3024         (ObjcInstance::end):
3025         (ObjcInstance::getClass):
3026         (ObjcInstance::invokeMethod):
3027         (ObjcInstance::defaultValue):
3028         (ObjcInstance::stringValue):
3029         (ObjcInstance::numberValue):
3030         (ObjcInstance::booleanValue):
3031         (ObjcInstance::valueOf):
3032         * bindings/objc/objc_jsobject.h: Added.
3033         * bindings/objc/objc_jsobject.mm: Added.
3034         * bindings/objc/objc_runtime.h:
3035         (KJS::Bindings::ObjcField::~ObjcField):
3036         (KJS::Bindings::ObjcField::ObjcField):
3037         (KJS::Bindings::ObjcField::operator=):
3038         (KJS::Bindings::ObjcMethod::ObjcMethod):
3039         (KJS::Bindings::ObjcMethod::~ObjcMethod):
3040         (KJS::Bindings::ObjcMethod::operator=):
3041         * bindings/objc/objc_runtime.mm: Added.
3042         (ObjcMethod::ObjcMethod):
3043         (ObjcMethod::name):
3044         (ObjcMethod::numParameters):
3045         (ObjcMethod::getMethodSignature):
3046         (ObjcField::ObjcField):
3047         (ObjcField::name):
3048         (ObjcField::type):
3049         (ObjcField::valueFromInstance):
3050         (ObjcField::setValueToInstance):
3051         * bindings/objc/objc_utility.h: Added.
3052         (KJS::Bindings::):
3053         * bindings/objc/objc_utility.mm: Added.
3054         (KJS::Bindings::JSMethodNameToObjCMethodName):
3055         (KJS::Bindings::convertValueToObjcValue):
3056         (KJS::Bindings::convertObjcValueToValue):
3057         (KJS::Bindings::objcValueTypeForType):
3058         * bindings/runtime.cpp:
3059         (MethodList::MethodList):
3060         (MethodList::operator=):
3061         (Instance::setValueOfField):
3062         (Instance::createBindingForLanguageInstance):
3063         (Instance::createRuntimeObject):
3064         * bindings/runtime.h:
3065         * bindings/runtime_method.cpp:
3066         (RuntimeMethodImp::RuntimeMethodImp):
3067         (RuntimeMethodImp::get):
3068         (RuntimeMethodImp::call):
3069         * bindings/runtime_method.h:
3070         * bindings/runtime_object.cpp:
3071         (RuntimeObjectImp::get):
3072         (RuntimeObjectImp::hasProperty):
3073         * bindings/test.js: Added.
3074         * bindings/testbindings.mm: Added.
3075         (-[MySecondInterface init]):
3076         (-[MyFirstInterface init]):
3077         (-[MyFirstInterface dealloc]):
3078         (+[MyFirstInterface JavaScriptNameForSelector:]):
3079         (-[MyFirstInterface getInt]):
3080         (-[MyFirstInterface setInt:]):
3081         (-[MyFirstInterface getMySecondInterface]):
3082         (-[MyFirstInterface logMessage:]):
3083         (GlobalImp::className):
3084         (readJavaScriptFromFile):
3085         (main):
3086
3087 === Safari-128 ===
3088
3089 2004-02-08  Darin Adler  <darin@apple.com>
3090
3091         Reviewed by Dave.
3092
3093         - fixed things seen in the profile, for a total speedup of 4% on cvs-base (including changes across all projects)
3094
3095         * JavaScriptCorePrefix.h: Add a workaround for a bug in our system headers that prevents the <ctype.h>
3096         macros from working right in C++ code that uses the <cctype> header.
3097
3098         * kjs/ustring.cpp:
3099         (KJS::inlineUTF8SequenceLengthNonASCII): Added.
3100         (KJS::UTF8SequenceLengthNonASCII): Added.
3101         (KJS::inlineUTF8SequenceLength): Added.
3102         (KJS::UTF8SequenceLength): Calls inlineUTF8SequenceLengthNonASCII now.
3103         (KJS::decodeUTF8Sequence): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII.
3104         (KJS::createSortedOffsetsArray): Add special case for 1, 2, and 3 offsets, so we don't do qsort for those.
3105         (KJS::convertUTF16OffsetsToUTF8Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII.
3106         (KJS::convertUTF8OffsetsToUTF16Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII.
3107
3108         - fixed the test program so it won't hit the interpreter lock assertion
3109
3110         * kjs/testkjs.cpp: (main): Just lock around the whole thing, since the test is singly threaded.
3111
3112 === Safari-127 ===
3113
3114 2004-02-06  Richard Williamson   <rjw@apple.com>
3115
3116         Fixed 3550242 and 3546977.  The first diff prevents an assert from firing.  The second diff prevents a JavaScript exception, caused be an invalid conversion, which has a downstream consequence of preventing a valid conversion.
3117
3118         Reviewed by John.
3119
3120         * bindings/jni/jni_jsobject.cpp:
3121         (JSObject::toString):
3122         * bindings/jni/jni_utility.cpp:
3123         (KJS::Bindings::convertValueToJValue):
3124
3125 2004-02-02  Darin Adler  <darin@apple.com>
3126
3127         Reviewed by Maciej.
3128
3129         - fixed <rdar://problem/3546613>: array of negative size leads to crash (test page at oscar.the-rileys.net)
3130
3131         * kjs/array_object.cpp:
3132         (ArrayInstanceImp::ArrayInstanceImp): If the length is greater than 10,000, don't allocate an array until
3133         we start putting values in. This prevents new Array(2147483647) from causing trouble.
3134         (ArrayObjectImp::construct): Check number as described in specification, and raise a range error if the
3135         number is out of range. This prevents new Array(-1) from causing trouble.
3136
3137         - fixed <rdar://problem/3545756>: Math.round screws up on numbers bigger than 2^31 (incorrect results on HP-35 calculator page)
3138
3139         * kjs/math_object.cpp: (MathFuncImp::call): Change implementation to be much simpler and not involve
3140         casting to int. Results now match those in other browsers.
3141
3142 2004-02-02  Darin Adler  <darin@apple.com>
3143
3144         Reviewed by Maciej.
3145
3146         - fixed <rdar://problem/3519285>: integer operations on large negative numbers yield bad results (discovered with "HTMLCrypt")
3147         - fixed other related overflow issues
3148
3149         * kjs/value.h: Changed return types of toInteger, toInt32, toUInt32, and toUInt16.
3150         * kjs/value.cpp:
3151         (ValueImp::toInteger): Change to return a double, since this operation, from the ECMA specification,
3152         must not restrict values to the range of a particular integer type.
3153         (ValueImp::toInt32): Used a sized integer type for the result of this function, and also added
3154         proper handling for negative results from fmod.
3155         (ValueImp::toUInt32): Ditto.
3156         (ValueImp::toUInt16): Ditto.
3157         (ValueImp::dispatchToUInt32): Changed result type from unsigned to uint32_t.
3158
3159         * kjs/array_object.cpp: (ArrayProtoFuncImp::call): Use a double instead of an int to handle
3160         out-of-integer-range values better in the slice function.
3161         * kjs/internal.cpp: (KJS::roundValue): Streamline the function, handling NAN and infinity properly.
3162         * kjs/number_object.cpp: (NumberProtoFuncImp::call): Use a double instead of an int to handle
3163         out-of-integer-range values better in the toString function.
3164         * kjs/string_object.cpp: (StringProtoFuncImp::call): Use a double instead of an int to handle
3165         out-of-integer-range values better in the charAt, charCodeAt, indexOf, lastIndexOf, slice,
3166         and substr functions.
3167
3168 === Safari-126 ===
3169
3170 2004-01-30  Richard Williamson   <rjw@apple.com>
3171
3172         Fixed 3542044.  Create KJS::String using UString constructor instead of passing UTF8 string to char* constructor.
3173
3174         Reviewed by Darin.
3175
3176         * bindings/jni/jni_instance.cpp:
3177         (JavaInstance::stringValue):
3178
3179 2004-01-26  Darin Adler  <darin@apple.com>
3180
3181         * Makefile.am: Switch from pbxbuild to xcodebuild.
3182
3183 2004-01-22  Richard Williamson   <rjw@apple.com>
3184
3185         Added stubs for ObjC language binding to JavaScript.
3186
3187         * JavaScriptCore.pbproj/project.pbxproj:
3188         * bindings/jni/jni_runtime.h:
3189         * bindings/objc/objc_runtime.h: Added.
3190         (KJS::Bindings::ObjcParameter::ObjcParameter):
3191         (KJS::Bindings::ObjcParameter::~ObjcParameter):
3192         (KJS::Bindings::ObjcParameter::operator=):
3193         (KJS::Bindings::ObjcParameter::type):
3194         (KJS::Bindings::ObjcConstructor::ObjcConstructor):
3195         (KJS::Bindings::ObjcConstructor::~ObjcConstructor):
3196         (KJS::Bindings::ObjcConstructor::_commonCopy):
3197         (KJS::Bindings::ObjcConstructor::operator=):
3198         (KJS::Bindings::ObjcConstructor::value):
3199         (KJS::Bindings::ObjcConstructor::parameterAt):
3200         (KJS::Bindings::ObjcConstructor::numParameters):
3201         (KJS::Bindings::ObjcField::ObjcField):
3202         (KJS::Bindings::ObjcField::~ObjcField):
3203         * bindings/runtime.h:
3204
3205 2004-01-22  Richard Williamson   <rjw@apple.com>
3206
3207         Simplified JavaString by using UString as backing store.  This
3208         revealed a bug in CString's assignment operator which I fixed.
3209
3210         Removed some dead code.
3211  
3212         Reviewed by John.
3213
3214         * bindings/jni/jni_runtime.h:
3215         (KJS::Bindings::JavaString::JavaString):
3216         (KJS::Bindings::JavaString::_commonInit):
3217         (KJS::Bindings::JavaString::UTF8String):
3218         (KJS::Bindings::JavaString::uchars):
3219         (KJS::Bindings::JavaString::length):
3220         (KJS::Bindings::JavaString::ustring):
3221         * bindings/runtime_object.cpp:
3222         (RuntimeObjectImp::RuntimeObjectImp):
3223         * bindings/runtime_object.h:
3224         * kjs/ustring.cpp:
3225         (KJS::CString::CString):
3226         (KJS::CString::operator=):
3227
3228 === Safari-125 ===
3229
3230 === Safari-124 ===
3231
3232 2004-01-16  Richard Williamson   <rjw@apple.com>
3233
3234         Fixed 3525853.  We weren't handling mapping to overloaded Java
3235         methods very well.  Even though this is undefined the other
3236         browsers support it.  Also fixed a bug with returning arrays
3237         from Java functions.
3238
3239         Reviewed by John.
3240
3241         * bindings/jni/jni_class.cpp:
3242         (JavaClass::_commonInit):
3243         (JavaClass::methodsNamed):
3244         * bindings/jni/jni_class.h:
3245         * bindings/jni/jni_instance.cpp:
3246         (JavaInstance::invokeMethod):
3247         * bindings/jni/jni_instance.h:
3248         * bindings/jni/jni_runtime.cpp:
3249         (JavaArray::convertJObjectToArray):
3250         (JavaField::valueFromInstance):
3251         (JavaMethod::signature):
3252         (JavaArray::valueAt):
3253         * bindings/jni/jni_runtime.h:
3254         * bindings/jni_jsobject.cpp:
3255         (JSObject::call):
3256         (JSObject::convertJObjectToValue):
3257         * bindings/runtime.cpp:
3258         (MethodList::addMethod):
3259         (MethodList::length):
3260         (MethodList::methodAt):
3261         (MethodList::~MethodList):
3262         * bindings/runtime.h:
3263         (KJS::Bindings::MethodList::MethodList):
3264         * bindings/runtime_method.cpp:
3265         (RuntimeMethodImp::RuntimeMethodImp):
3266         (RuntimeMethodImp::get):
3267         (RuntimeMethodImp::call):
3268         * bindings/runtime_method.h:
3269         * bindings/runtime_object.cpp:
3270         (RuntimeObjectImp::get):
3271         (RuntimeObjectImp::hasProperty):
3272
3273 2004-01-16  Richard Williamson   <rjw@apple.com>
3274
3275         Fixed 3531229.  Another place that needs the  Push/PopLocalFrame
3276         protection implemented for 3530401.
3277
3278         Reviewed by John.
3279
3280         * bindings/runtime_method.cpp:
3281         (RuntimeMethodImp::call):
3282
3283 2004-01-15  Richard Williamson   <rjw@apple.com>
3284
3285         Fixed 3530401.  JNI doesn't cleanup local refs created on the
3286         main thread.   IMO this is a bad bug in our JMI implementation.
3287
3288         To work-around the problem I explicitly delete all local refs.
3289         Further, I've added Push/PopLocalFrame calls to catch any refs
3290         that I may have missed.  This will guarantee that we don't leak
3291         any Java references.
3292
3293         Reviewed by John.
3294
3295         * bindings/jni/jni_class.cpp:
3296         (JavaClass::_commonInit):
3297         (JavaClass::JavaClass):
3298         * bindings/jni/jni_instance.cpp:
3299         (JavaInstance::begin):
3300         (JavaInstance::end):
3301         * bindings/jni/jni_instance.h:
3302         * bindings/jni/jni_runtime.cpp:
3303         (JavaConstructor::JavaConstructor):
3304         (JavaMethod::JavaMethod):
3305         * bindings/jni_jsobject.cpp:
3306         (JSObject::listFromJArray):
3307         * bindings/runtime.h:
3308         (KJS::Bindings::Instance::begin):
3309         (KJS::Bindings::Instance::end):
3310         * bindings/runtime_object.cpp:
3311         (RuntimeObjectImp::get):
3312         (RuntimeObjectImp::put):
3313         (RuntimeObjectImp::canPut):
3314         (RuntimeObjectImp::hasProperty):
3315         (RuntimeObjectImp::defaultValue):
3316
3317 2004-01-15  Vicki Murley  <vicki@apple.com>
3318
3319         Reviewed by Darin.
3320
3321         * JavaScriptCore.pbproj/project.pbxproj: Update copyright date to 2004.
3322
3323 2004-01-14  Richard Williamson   <rjw@apple.com>
3324         
3325         Fixed 3529466.  With recent changes to Java plugin we must no
3326         longer call DeleteLocalRef().  Not a problem, it was an optimization anyway.
3327
3328         Reviewed by John.
3329
3330         * bindings/jni/jni_instance.cpp:
3331         (JObjectWrapper::JObjectWrapper):
3332
3333 === Safari-122 ===
3334
3335 2004-01-14  Richard Williamson   <rjw@apple.com>
3336
3337         Fixed 3529010.
3338
3339         Finalize may be called on an JSObject after we've already remove all our references.  The assert in this case is firing because we've received a finalize call from Java for an instance that we no longer know about.  The fix is to check in finalize that we're getting a call on an instance that we still care about.
3340
3341         Reviewed by John.
3342
3343         * bindings/jni_jsobject.cpp:
3344         (addJavaReference):
3345         (removeJavaReference):
3346         (RootObject::removeAllJavaReferencesForRoot):
3347         (JSObject::invoke):
3348
3349 2004-01-13  Richard Williamson   <rjw@apple.com>
3350
3351         Fixed 3528324. 
3352
3353         The run loop that is used to execute JavaScript (in practice, always the main run loop) is held in a class variable.  It is set and retained once and should not be released.  Unfortunately is it being released when the 'root' object on a LiveConnect applet is released.  This has the symptom of eventually causing an deallocation of the main run loop!  Usually after about 5 instantiations/destructions of a LiveConnect applet.  The CFRelease of the run loop was removed.
3354
3355         Reviewed by Hyatt.
3356
3357         * bindings/jni_jsobject.h:
3358         (KJS::Bindings::RootObject::~RootObject):
3359
3360 === Safari-121 ===
3361
3362 === Safari-120 ===
3363
3364 2004-01-06  Richard Williamson   <rjw@apple.com>
3365
3366         Fixed 3521814.  Finalize messages weren't being dispatched!
3367
3368         Reviewed by John.
3369
3370         * bindings/jni_jsobject.cpp:
3371         (JSObject::invoke):
3372
3373 2004-01-05  Richard Williamson   <rjw@apple.com>
3374
3375         Added cache of JNI method IDs to minimize allocations.  This mitigates the problem
3376         described by 3515579.
3377
3378         Also cleanup up logging of Java exceptions.
3379
3380         Reviewed by John.
3381
3382         * bindings/jni/jni_class.cpp:
3383         (JavaClass::classForInstance):
3384         * bindings/jni/jni_instance.cpp:
3385         (JavaInstance::JavaInstance):
3386         (JavaInstance::getClass):
3387         (JavaInstance::invokeMethod):
3388         (JObjectWrapper::JObjectWrapper):
3389         (JObjectWrapper::~JObjectWrapper):
3390         * bindings/jni/jni_instance.h:
3391         (KJS::Bindings::JavaInstance::operator=):
3392         * bindings/jni/jni_runtime.cpp:
3393         (JavaMethod::JavaMethod):
3394         (JavaMethod::methodID):
3395         * bindings/jni/jni_runtime.h:
3396         (KJS::Bindings::JavaMethod::JavaMethod):
3397         * bindings/jni/jni_utility.cpp:
3398         (callJNIMethod):
3399         (callJNIMethodIDA):
3400         (callJNIMethodA):
3401         (KJS::Bindings::getMethodID):
3402         (KJS::Bindings::callJNIVoidMethodIDA):
3403         (KJS::Bindings::callJNIObjectMethodIDA):
3404         (KJS::Bindings::callJNIByteMethodIDA):
3405         (KJS::Bindings::callJNICharMethodIDA):
3406         (KJS::Bindings::callJNIShortMethodIDA):
3407         (KJS::Bindings::callJNIIntMethodIDA):
3408         (KJS::Bindings::callJNILongMethodIDA):
3409         (KJS::Bindings::callJNIFloatMethodIDA):
3410         (KJS::Bindings::callJNIDoubleMethodIDA):
3411         (KJS::Bindings::callJNIBooleanMethodIDA):
3412         (KJS::Bindings::getCharactersFromJStringInEnv):
3413         (KJS::Bindings::getUCharactersFromJStringInEnv):
3414         (KJS::Bindings::getJNIField):
3415         * bindings/jni/jni_utility.h:
3416
3417 l2003-12-23  John Sullivan  <sullivan@apple.com>
3418
3419         * JavaScriptCore.pbproj/project.pbxproj:
3420         Xcode version wars, harmless
3421
3422 2003-12-23  Darin Adler  <darin@apple.com>
3423
3424         Reviewed by John (concept, not code, which is just the old code coming back).
3425
3426         - fixed 3518092: REGRESSION (100-119): getting NaN instead of HH:MM times
3427
3428         * kjs/date_object.cpp: Added back our CF-based implementations of gmtime, localtime,
3429         mktime, timegm, and time, because mktime, at least, won't handle a year of 0.
3430
3431 2003-12-19  Richard Williamson   <rjw@apple.com>
3432
3433         Fixed 3515597.  When an error occurs we need
3434         to make sure result values are zeroed.
3435
3436         Cleaned up logs by adding a newline.
3437
3438         Reviewed by John.
3439
3440         * bindings/jni/jni_utility.cpp:
3441         (KJS::Bindings::getJavaVM):
3442         (KJS::Bindings::getJNIEnv):
3443         (callJNIMethod):
3444         (callJNIMethodA):
3445         (KJS::Bindings::getJNIField):
3446         * bindings/jni_jsobject.cpp:
3447         (JSObject::convertValueToJObject):
3448
3449 === Safari-119 ===
3450
3451 2003-12-17  Richard Williamson   <rjw@apple.com>
3452
3453         Ensure that all the symbols we export are in the KJS
3454         namespace (3512245).
3455
3456         Also renamed JavaString.characters() to JavaString.UTF8String()
3457         for enhanced clarity.
3458
3459         Added some sanity checking to constructor of JObjectWrapper.
3460
3461         Reviewed by Dave.
3462
3463         * ChangeLog:
3464         * bindings/jni/jni_class.cpp:
3465         * bindings/jni/jni_class.h:
3466         * bindings/jni/jni_instance.cpp:
3467         (JavaInstance::invokeMethod):
3468         (JObjectWrapper::JObjectWrapper):
3469         * bindings/jni/jni_instance.h:
3470         * bindings/jni/jni_runtime.cpp:
3471         (JavaParameter::JavaParameter):
3472         (JavaField::JavaField):
3473         (JavaMethod::JavaMethod):
3474         (JavaMethod::signature):
3475         * bindings/jni/jni_runtime.h:
3476         (KJS::Bindings::JavaString::ascii):
3477         (KJS::Bindings::JavaString::UTF8String):
3478         (KJS::Bindings::JavaString::JavaString):
3479         (KJS::Bindings::JavaString::_commonInit):
3480         (KJS::Bindings::JavaString::uchars):
3481         (KJS::Bindings::JavaString::length):
3482         (KJS::Bindings::JavaString::ustring):
3483         (KJS::Bindings::JavaParameter::type):
3484         (KJS::Bindings::JavaField::name):
3485         (KJS::Bindings::JavaField::type):
3486         (KJS::Bindings::JavaMethod::name):
3487         (KJS::Bindings::JavaMethod::returnType):
3488         * bindings/jni/jni_utility.cpp:
3489         (KJS::Bindings::getJavaVM):
3490         (KJS::Bindings::getJNIEnv):
3491         (KJS::Bindings::callJNIVoidMethod):
3492         (KJS::Bindings::callJNIObjectMethod):
3493         (KJS::Bindings::callJNIBooleanMethod):
3494         (KJS::Bindings::callJNIByteMethod):
3495         (KJS::Bindings::callJNICharMethod):
3496         (KJS::Bindings::callJNIShortMethod):
3497         (KJS::Bindings::callJNIIntMethod):
3498         (KJS::Bindings::callJNILongMethod):
3499         (KJS::Bindings::callJNIFloatMethod):
3500         (KJS::Bindings::callJNIDoubleMethod):
3501         (KJS::Bindings::callJNIVoidMethodA):
3502         (KJS::Bindings::callJNIObjectMethodA):
3503         (KJS::Bindings::callJNIByteMethodA):
3504         (KJS::Bindings::callJNICharMethodA):
3505         (KJS::Bindings::callJNIShortMethodA):
3506         (KJS::Bindings::callJNIIntMethodA):
3507         (KJS::Bindings::callJNILongMethodA):
3508         (KJS::Bindings::callJNIFloatMethodA):
3509         (KJS::Bindings::callJNIDoubleMethodA):
3510         (KJS::Bindings::callJNIBooleanMethodA):
3511         (KJS::Bindings::getCharactersFromJString):
3512         (KJS::Bindings::releaseCharactersForJString):
3513         (KJS::Bindings::getCharactersFromJStringInEnv):
3514         (KJS::Bindings::releaseCharactersForJStringInEnv):
3515         (KJS::Bindings::getUCharactersFromJStringInEnv):
3516         (KJS::Bindings::releaseUCharactersForJStringInEnv):
3517         (KJS::Bindings::JNITypeFromClassName):
3518         (KJS::Bindings::signatureFromPrimitiveType):
3519         (KJS::Bindings::JNITypeFromPrimitiveType):
3520         (KJS::Bindings::getJNIField):
3521         (KJS::Bindings::convertValueToJValue):
3522         * bindings/jni/jni_utility.h:
3523         * bindings/jni_jsobject.cpp:
3524         (KJS::Bindings::JSObject::invoke):
3525         (KJS::Bindings::JSObject::JSObject):
3526         (KJS::Bindings::JSObject::call):
3527         (KJS::Bindings::JSObject::eval):
3528         (KJS::Bindings::JSObject::getMember):
3529         (KJS::Bindings::JSObject::setMember):
3530         (KJS::Bindings::JSObject::removeMember):
3531         (KJS::Bindings::JSObject::getSlot):
3532         (KJS::Bindings::JSObject::setSlot):
3533         (KJS::Bindings::JSObject::toString):
3534         (KJS::Bindings::JSObject::finalize):
3535         (KJS::Bindings::JSObject::createNative):
3536         (KJS::Bindings::JSObject::convertValueToJObject):
3537         (KJS::Bindings::JSObject::convertJObjectToValue):
3538         (KJS::Bindings::JSObject::listFromJArray):
3539         * bindings/jni_jsobject.h:
3540         * bindings/runtime.cpp:
3541         * bindings/runtime.h:
3542         * bindings/runtime_method.cpp:
3543         * bindings/runtime_method.h:
3544
3545 === Safari-118 ===
3546
3547 2003-12-16  Richard Williamson   <rjw@apple.com>
3548
3549         Ack!  More assertions.  Lock ALL entry points into the interpreter!
3550         (3511733).
3551
3552         Reviewed by Ken.
3553
3554         * bindings/jni_jsobject.cpp:
3555         (Bindings::JSObject::call):
3556         (Bindings::JSObject::eval):
3557         (Bindings::JSObject::getMember):
3558         (Bindings::JSObject::setMember):
3559         (Bindings::JSObject::removeMember):
3560         (Bindings::JSObject::getSlot):
3561         (Bindings::JSObject::setSlot):
3562         (Bindings::JSObject::convertJObjectToValue):
3563
3564 2003-12-15  Richard Williamson   <rjw@apple.com>
3565
3566         Fixed a couple of snafus and removed some logging.
3567
3568         Reviewed by Maciej.
3569
3570         * bindings/jni_jsobject.cpp:
3571         (Bindings::performJavaScriptAccess):
3572         (Bindings::completedJavaScriptAccess):
3573         (Bindings::dispatchToJavaScriptThread):
3574         Removed some annoying JS_LOG clutter.
3575