ChangeLog 814 KB
Newer Older
ap's avatar
ap committed
1 2 3 4 5 6 7 8 9 10 11 12
2007-03-18  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff.

        http://bugs.webkit.org/show_bug.cgi?id=13105
        REGRESSION: an exception raised when calculating base value of a dot expression is not returned

        Test: fast/js/dot-node-base-exception.html

        * kjs/nodes.cpp:
        (FunctionCallDotNode::evaluate): Added the necessary KJS_CHECKEXCEPTIONVALUE.

13 14 15 16 17 18
2007-03-18  Steve Falkenburg  <sfalken@apple.com>

        Build fix.

        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj:

thatcher's avatar
thatcher committed
19 20 21 22 23 24 25 26 27 28 29 30
2007-03-17  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Mark Rowe.

        Made Version.xcconfig smarter when building for different configurations.
        Now uses the 522+ OpenSource version for Debug and Release, while using the
        full 522.4 version for Production builds. The system prefix is also computed
        based on the current system, so 4522.4 on Tiger and 5522.4 on Leopard.

        * Configurations/JavaScriptCore.xcconfig:
        * Configurations/Version.xcconfig:

mjs's avatar
mjs committed
31 32 33 34 35 36 37 38
2007-03-15  Maciej Stachowiak  <mjs@apple.com>

        Not reviewed.
        
        - build fix

        * wtf/TCSystemAlloc.cpp:

mjs's avatar
mjs committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
2007-03-15  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Geoff and Steve.
        
        - fix some portability issues with TCMalloc.

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * kjs/config.h:
        * wtf/FastMalloc.cpp:
        (WTF::SizeClass):
        (WTF::InitSizeClasses):
        (WTF::TCMalloc_PageHeap::Split):
        (WTF::TCMalloc_PageHeap::RegisterSizeClass):
        (WTF::TCMalloc_Central_FreeList::length):
        (WTF::TCMalloc_ThreadCache::InitTSD):
        (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
        * wtf/TCSpinLock.h:
        * wtf/TCSystemAlloc.cpp:
        (TryVirtualAlloc):
        (TCMalloc_SystemAlloc):

thatcher's avatar
thatcher committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
2007-03-15  Timothy Hatcher  <timothy@apple.com>

        Reviewed by John.

        * Factored out most of our common build settings into .xcconfig files. Anything that was common in
          each build configuration was factored out into the shared .xcconfig file.
        * Adds a Version.xcconfig file to define the current framework version, to be used in other places.
        * Use the new $(BUNDLE_VERSION) (defined in Version.xcconfig) in the preprocessed Info.plist.
        * Use the versions defined in Version.xcconfig to set $(DYLIB_CURRENT_VERSION).

        * Configurations/Base.xcconfig: Added.
        * Configurations/DebugRelease.xcconfig: Added.
        * Configurations/JavaScriptCore.xcconfig: Added.
        * Configurations/Version.xcconfig: Added.
        * Info.plist:
        * JavaScriptCore.xcodeproj/project.pbxproj:

77 78 79 80 81 82
2007-03-16  Shrikant Gangoda  <shrikant.gangoda@celunite.com>

        Gdk build fix.

        * kjs/DateMath.cpp:  gettimeofday comes from <sys/time.h> on Linux.

kmccullo's avatar
kmccullo committed
83 84 85 86 87 88 89 90 91
2007-03-14  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by .

        - Fixed one more build breakage

        * kjs/date_object.cpp:
        (KJS::formatLocaleDate):

kmccullo's avatar
kmccullo committed
92 93 94 95 96 97 98 99 100 101 102
2007-03-14  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by .

        - Fixed a build breakage.

        * kjs/DateMath.cpp:
        * kjs/date_object.cpp:
        (KJS::formatLocaleDate):
        (KJS::DateObjectImp::construct):

kmccullo's avatar
kmccullo committed
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
2007-03-14  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by Geoff.

        - rdar://problem/5045720
        - DST changes in US affect JavaScript date calculations (12975)
        This fix was to ensure we properly test for the new changes to DST in the US.
        Also this fixes when we apply DST, now we correctly map most past years to current
        DST rules.  We still have a small issue with years before 1900 or after 2100.
        rdar://problem/5055038

        * kjs/DateMath.cpp: Fix DST to match spec better.
        (KJS::getCurrentUTCTime):
        (KJS::mimimumYearForDST):
        (KJS::maximumYearForDST):
        (KJS::equivalentYearForDST):
        (KJS::getDSTOffset):
        * kjs/DateMath.h: Consolodated common funtionality.
        * kjs/date_object.cpp: Consolodated common functionality.
        (KJS::formatLocaleDate):
        (KJS::DateObjectImp::construct):
        * tests/mozilla/ecma/jsref.js: Added functions for finding the correct days when DST starts and ends.
        * tests/mozilla/ecma/shell.js: Added back in the old DST functions for ease of merging with mozilla if needed.
        * tests/mozilla/ecma_2/jsref.js: Added functions for finding the correct days when DST starts and ends.
        * tests/mozilla/ecma_3/Date/shell.js: Added functions for finding the correct days when DST starts and ends.
        * tests/mozilla/expected.html: Updated to show all date tests passing.

thatcher's avatar
thatcher committed
130 131
=== Safari-5522.4 ===

kmccullo's avatar
kmccullo committed
132 133 134 135 136 137 138 139 140
2007-03-13  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by .

        - Adding expected failures until the are truly fixed. 
        - rdar://problem/5060302

        * tests/mozilla/expected.html:

kmccullo's avatar
kmccullo committed
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
2007-03-12  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by .

        - Actually update tests for new DST rules.

        * tests/mozilla/ecma/Date/15.9.3.1-1.js:
        * tests/mozilla/ecma/Date/15.9.3.1-2.js:
        * tests/mozilla/ecma/Date/15.9.3.1-3.js:
        * tests/mozilla/ecma/Date/15.9.3.1-4.js:
        * tests/mozilla/ecma/Date/15.9.3.1-5.js:
        * tests/mozilla/ecma/Date/15.9.3.2-1.js:
        * tests/mozilla/ecma/Date/15.9.3.2-2.js:
        * tests/mozilla/ecma/Date/15.9.3.2-3.js:
        * tests/mozilla/ecma/Date/15.9.3.2-4.js:
        * tests/mozilla/ecma/Date/15.9.3.2-5.js:
        * tests/mozilla/ecma/Date/15.9.3.8-1.js:
        * tests/mozilla/ecma/Date/15.9.3.8-2.js:
        * tests/mozilla/ecma/Date/15.9.3.8-3.js:
        * tests/mozilla/ecma/Date/15.9.3.8-4.js:
        * tests/mozilla/ecma/Date/15.9.3.8-5.js:
        * tests/mozilla/ecma/Date/15.9.5.10-1.js:
        * tests/mozilla/ecma/Date/15.9.5.10-10.js:
        * tests/mozilla/ecma/Date/15.9.5.10-11.js:
        * tests/mozilla/ecma/Date/15.9.5.10-12.js:
        * tests/mozilla/ecma/Date/15.9.5.10-13.js:
        * tests/mozilla/ecma/Date/15.9.5.10-2.js:
        * tests/mozilla/ecma/Date/15.9.5.10-3.js:
        * tests/mozilla/ecma/Date/15.9.5.10-4.js:
        * tests/mozilla/ecma/Date/15.9.5.10-5.js:
        * tests/mozilla/ecma/Date/15.9.5.10-6.js:
        * tests/mozilla/ecma/Date/15.9.5.10-7.js:
        * tests/mozilla/ecma/Date/15.9.5.10-8.js:
        * tests/mozilla/ecma/Date/15.9.5.10-9.js:
        * tests/mozilla/ecma/jsref.js:
        * tests/mozilla/ecma_2/jsref.js:
        * tests/mozilla/ecma_3/Date/shell.js:

kmccullo's avatar
kmccullo committed
179 180 181 182 183 184 185 186
2007-03-12  Kevin McCullough  <kmccullough@apple.com>

        Reviewed by .

        - Update tests for new DST rules.

        * tests/mozilla/ecma/shell.js:

ggaren's avatar
ggaren committed
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
2007-03-11  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        Fixed <rdar://problem/4681051> Installer crashes in KJS::Collector::
        markOtherThreadConservatively(KJS::Collector::Thread*) trying to install 
        iLife 06 using Rosetta on an Intel Machine
        
        The problem was that our thread-specific data destructor would modify the
        list of active JavaScript threads without holding the JSLock, corrupting
        the list. Corruption was especially likely if one JavaScript thread exited 
        while another was starting up.

        * JavaScriptCore.exp:
        * kjs/JSLock.cpp: Don't conflate locking the JSLock with registering a
        thread, since the thread-specific data destructor needs to lock
        without registering a thread. Instead, treat thread registration as a
        part of the convenience of the JSLock object, and whittle down JSLock::lock()
        to just the bits that actually do the locking.
        (KJS::JSLock::lock):
        (KJS::JSLock::registerThread):
        * kjs/JSLock.h: Updated comments to mention the new behavior above, and
        other recent changes.
        (KJS::JSLock::JSLock):
        * kjs/collector.cpp:
        (KJS::destroyRegisteredThread): Lock here.
        (KJS::Collector::registerThread): To match, assert that we're locked here.

ggaren's avatar
ggaren committed
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330
2007-03-10  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.

        Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and 
        JSCore causes a hang @ www.panoramas.dk
        
        With a PAC file, run-webkit-tests --threaded passes, the reported site
        works, and all the Quicktime/JavaScript and Flash/JavaScript examples
        I found through Google work, too.
        
        Any time JavaScript causes arbitrary non-JavaScript code to execute, it 
        risks deadlock, because that code may block, trying to acquire a lock 
        owned by a thread that is waiting to execute JavaScript. In this case,
        the thread was a networking thread that was waiting to interpret a PAC file.
        
        Because non-JavaScript code may execute in response to, well, anything,
        a perfect solution to this problem is impossible. I've implemented an
        optimistic solution, instead: JavaScript will drop its lock whenever it
        makes a direct call to non-JavaScript code through a bridging/plug-in API,
        but will blissfully ignore the indirect ways it may cause non-JavaScript 
        code to run (resizing a window, for example). 
        
        Unfortunately, this solution introduces significant locking overhead in 
        the bridging APIs. I don't see a way around that.

        This patch includes some distinct bug fixes I saw along the way:
        
        * bindings/objc/objc_instance.mm: Fixed a bug where a nested begin() call
        would leak its autorelease pool, because it would NULL out _pool without
        draining it.

        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::methodGetter): Don't copy an Identifier to ASCII only
        to turn around and make an Identifier from the ASCII. In an earlier 
        version of this patch, the copy caused an assertion failure. Now it's 
        just unnecessary work.
        (RuntimeObjectImp::getOwnPropertySlot): ditto

        * bindings/objc/objc_instance.h: Removed overrides of setVAlueOfField and
        getValueOfField, because they did exactly what the base class versions did.
        Removed overrides of Noncopyable declarations for the same reason.

        * bindings/runtime.h: Inherit from Noncopyable instead of rolling our own.
        * bindings/c/c_instance.h: ditto

        And the actual patch:
        
        * API/JSCallbackConstructor.cpp: Drop all locks when calling out to C.
        (KJS::JSCallbackConstructor::construct):
        * API/JSCallbackFunction.cpp: ditto
        (KJS::JSCallbackFunction::callAsFunction):
        * API/JSCallbackObject.cpp: ditto
        (KJS::JSCallbackObject::init):
        (KJS::JSCallbackObject::~JSCallbackObject):
        (KJS::JSCallbackObject::getOwnPropertySlot):
        (KJS::JSCallbackObject::put):
        (KJS::JSCallbackObject::deleteProperty):
        (KJS::JSCallbackObject::construct):
        (KJS::JSCallbackObject::hasInstance):
        (KJS::JSCallbackObject::callAsFunction):
        (KJS::JSCallbackObject::getPropertyNames):
        (KJS::JSCallbackObject::toNumber):
        (KJS::JSCallbackObject::toString):
        (KJS::JSCallbackObject::staticValueGetter):
        (KJS::JSCallbackObject::callbackGetter):
        
        * bindings/c/c_instance.cpp: Drop all locks when calling out to C.
        (KJS::Bindings::CInstance::invokeMethod):
        (KJS::Bindings::CInstance::invokeDefaultMethod):
        * bindings/c/c_runtime.cpp: Drop all locks when calling out to C.
        (KJS::Bindings::CField::valueFromInstance):
        (KJS::Bindings::CField::setValueToInstance):
        * bindings/jni/jni_objc.mm:
        (KJS::Bindings::dispatchJNICall): Drop all locks when calling out to Java.

        * bindings/objc/objc_instance.mm: The changes here are to accomodate the
        fact that C++ unwinding of DropAllLocks goes crazy when you put it inside
        a @try block. I moved all JavaScript stuff outside of the @try blocks, and 
        then prefixed the whole blocks with DropAllLocks objects. This required some
        supporting changes in other functions, which now acquire the JSLock for
        themselves, intead of relying on their callers to do so.
        (ObjcInstance::end):
        (ObjcInstance::invokeMethod):
        (ObjcInstance::invokeDefaultMethod):
        (ObjcInstance::setValueOfUndefinedField):
        (ObjcInstance::getValueOfUndefinedField):
        * bindings/objc/objc_runtime.mm: Same as above, except I didn't want to
        change throwError to acquire the JSLock for itself.
        (ObjcField::valueFromInstance):
        (ObjcField::setValueToInstance):
        * bindings/objc/objc_utility.mm: Supporting changes mentioned above.
        (KJS::Bindings::convertValueToObjcValue):
        (KJS::Bindings::convertObjcValueToValue):

        * kjs/JSLock.cpp: 
        (1) Fixed DropAllLocks to behave as advertised, and drop the JSLock only 
        if the current thread actually acquired it in the first place. This is 
        important because WebKit needs to ensure that the JSLock has been 
        dropped before it makes a plug-in call, even though it doesn't know if 
        the current thread actually acquired the JSLock. (We don't want WebKit
        to accidentally drop a lock belonging to *another thread*.)
        (2) Used the new per-thread code written for (1) to make recursive calls
        to JSLock very cheap. JSLock now knows to call pthread_mutext_lock/ 
        pthread_mutext_unlock only at nesting level 0.
        (KJS::createDidLockJSMutex):
        (KJS::JSLock::lock):
        (KJS::JSLock::unlock):
        (KJS::DropAllLocks::DropAllLocks):
        (KJS::DropAllLocks::~DropAllLocks):
        (KJS::JSLock::lockCount):
        * kjs/JSLock.h: Don't duplicate Noncopyable.
        (KJS::JSLock::~JSLock):

        * wtf/Assertions.h: Blind attempt at helping the Windows build.

331 332 333 334 335 336 337 338 339
2007-03-08  MorganL  <morganl.webkit@yahoo.com>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=13018
        Bug 13018: allow embedders to override the definition of CRASH.

        * wtf/Assertions.h: make it possible to override CRASH.

bdash's avatar
bdash committed
340 341 342 343 344 345 346 347 348 349
2007-03-07  Anrong Hu  <huanr@yahoo.com>

        Reviewed by Maciej.

        Fix http://bugs.webkit.org/show_bug.cgi?id=12535
        Bug 12535: Stack-optimizing compilers can trick GC into freeing in-use objects

        * kjs/internal.cpp:
        (KJS::StringImp::toObject): Copy val onto the stack so it is not subject to garbage collection.

350 351 352 353 354 355 356 357 358 359 360
2007-03-07  Geoffrey Garen  <ggaren@apple.com>

        Build fix for non-multiple-thread folks.
        
        Use a shared global in the non-multiple-thread case.

        * wtf/FastMalloc.cpp:
        (WTF::isForbidden):
        (WTF::fastMallocForbid):
        (WTF::fastMallocAllow):

ggaren's avatar
ggaren committed
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
2007-03-07  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Fixed ASSERT failure I just introduced.
        
        Made the fastMalloc isForbidden flag per thread. (Oops!) We expect that
        other threads will malloc while we're marking -- we just want to prevent
        our own marking from malloc'ing.

        * wtf/FastMalloc.cpp:
        (WTF::initializeIsForbiddenKey):
        (WTF::isForbidden):
        (WTF::fastMallocForbid):
        (WTF::fastMallocAllow):
        (WTF::fastMalloc):
        (WTF::fastCalloc):
        (WTF::fastFree):
        (WTF::fastRealloc):
        (WTF::do_malloc):

382 383 384 385 386 387 388 389 390 391 392
2007-03-07  Shrikant Gangoda  <shrikant.gangoda@celunite.com>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12997

        Wrap pthread-specific assertion in #if USE(MULTIPLE_THREADS).

        * kjs/collector.cpp:
        (KJS::Collector::markMainThreadOnlyObjects):

ggaren's avatar
ggaren committed
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
2007-03-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/4576242> | http://bugs.webkit.org/show_bug.cgi?id=12586
        PAC file: malloc deadlock sometimes causes a hang @ www.apple.com/pro/profiles/ (12586)
        
        This is a modified version of r14752 on the branch.
        
        These changes just add debugging functionality. They ASSERT that we don't 
        malloc during the mark phase of a garbage collection, which can cause a
        deadlock.

        * kjs/collector.cpp:
        (KJS::Collector::collect):
        * wtf/FastMalloc.cpp:
        (WTF::fastMallocForbid):
        (WTF::fastMallocAllow):
        (WTF::fastMalloc):
        (WTF::fastCalloc):
        (WTF::fastFree):
        (WTF::fastRealloc):
        (WTF::do_malloc):
        * wtf/FastMalloc.h:

ggaren's avatar
ggaren committed
418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533
2007-03-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed all known crashers exposed by run-webkit-tests --threaded. This covers:

        <rdar://problem/4565394> | http://bugs.webkit.org/show_bug.cgi?id=12585 
            PAC file: after closing a window that contains macworld.com, new window 
            crashes (KJS::PropertyMap::mark()) (12585)
        <rdar://problem/4571215> | http://bugs.webkit.org/show_bug.cgi?id=9211
            PAC file: Crash occurs when clicking on the navigation tabs at http://www.businessweek.com/ (9211)
        <rdar://problem/4557926> 
            PAC file: Crash occurs when attempting to view image in slideshow mode 
            at http://d.smugmug.com/gallery/581716 ( KJS::IfNode::execute (KJS::
            ExecState*) + 312) if you use a PAC file

        (1) Added some missing JSLocks, along with related ASSERTs.
        
        (2) Fully implemented support for objects that can only be garbage collected
        on the main thread. So far, only WebCore uses this. We can add it to API
        later if we learn that it's needed. 
        
        The implementation uses a "main thread only" flag inside each object. When 
        collecting on a secondary thread, the Collector does an extra pass through 
        the heap to mark all flagged objects before sweeping. This solution makes
        the common case -- flag lots of objects, but never collect on a secondary 
        thread -- very fast, even though the uncommon case of garbage collecting
        on a secondary thread isn't as fast as it could be. I left some notes 
        about how to speed it up, if we ever care.
        
        For posterity, here are some things I learned about GC while investigating:
        
        * Each collect must either mark or delete every heap object. "Zombie" 
        objects, which are neither marked nor deleted, raise these issues:

            * On the next pass, the conservative marking algorithm might mark a 
            zombie, causing it to mark freed objects.

            * The client might try to use a zombie, which would seem live because 
            its finalizer had not yet run.

        * A collect on the main thread is free to delete any object. Presumably, 
        objects allocated on secondary threads have thread-safe finalizers.

        * A collect on a secondary thread must not delete thread-unsafe objects.

        * The mark function must be thread-safe.
        
        Line by line comments:

        * API/JSObjectRef.h: Added comment specifying that the finalize callback 
        may run on any thread.

        * JavaScriptCore.exp: Nothing to see here.

        * bindings/npruntime.cpp:
        (_NPN_GetStringIdentifier): Added JSLock.

        * bindings/objc/objc_instance.h:
        * bindings/objc/objc_instance.mm:
        (ObjcInstance::~ObjcInstance): Use an autorelease pool. The other callers 
        to CFRelease needed one, too, but they were dead code, so I removed them 
        instead. (This fixes a leak seen while running run-webkit-tests --threaded,
        although I don't think it's specifically a threading issue.) 
        
        * kjs/collector.cpp:
        (KJS::Collector::collectOnMainThreadOnly): New function. Tells the collector
        to collect a value only if it's collecting on the main thread.
        (KJS::Collector::markMainThreadOnlyObjects): New function. Scans the heap
        for "main thread only" objects and marks them.

        * kjs/date_object.cpp: 
        (KJS::DateObjectImp::DateObjectImp): To make the new ASSERTs happy, allocate 
        our globals on the heap, avoiding a seemingly unsafe destructor call at 
        program exit time.
        * kjs/function_object.cpp:
        (FunctionPrototype::FunctionPrototype): ditto

        * kjs/interpreter.cpp:
        (KJS::Interpreter::mark): Removed boolean parameter, which was an incomplete
        and arguably hackish way to implement markMainThreadOnlyObjects() inside WebCore.
        * kjs/interpreter.h:

        * kjs/identifier.cpp:
        (KJS::identifierTable): Added some ASSERTs to check for thread safety 
        problems.

        * kjs/list.cpp: Added some ASSERTs to check for thread safety problems.
        (KJS::allocateListImp):
        (KJS::List::release):
        (KJS::List::append):
        (KJS::List::empty): Make the new ASSERTs happy.

        * kjs/object.h:
        (KJS::JSObject::JSObject): "m_destructorIsThreadSafe" => "m_collectOnMainThreadOnly".
        I removed the constructor parameter because m_collectOnMainThreadOnly,
        like m_marked, is a Collector bit, so only the Collector should set or get it.

        * kjs/object_object.cpp:
        (ObjectPrototype::ObjectPrototype): Make the ASSERTs happy.
        * kjs/regexp_object.cpp:
        (RegExpPrototype::RegExpPrototype): ditto

        * kjs/ustring.cpp: Added some ASSERTs to check for thread safety problems.
        (KJS::UCharReference::ref): 
        (KJS::UString::Rep::createCopying):
        (KJS::UString::Rep::create):
        (KJS::UString::Rep::destroy):
        (KJS::UString::null): Make the new ASSERTs happy.
        * kjs/ustring.h:
        (KJS::UString::Rep::ref): Added some ASSERTs to check for thread safety problems.
        (KJS::UString::Rep::deref):

        * kjs/value.h:
        (KJS::JSCell::JSCell):

ggaren's avatar
ggaren committed
534 535 536 537 538 539 540 541 542 543 544 545
2007-03-06  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        2% speedup on super accurate JS iBench.

        (KJS::Collector::collect): Removed anti-optimization to call
        pthread_is_threaded_np() before calling pthread_main_np(). Almost all 
        apps have more than one thread, so the extra call is actually worse.
        Interestingly, even the single-threaded testkjs shows a speed gain
        from removing the pthread_is_threaded_np() short-circuit. Not sure why.

ddkilzer's avatar
ddkilzer committed
546 547 548 549 550 551 552 553 554 555
2007-03-04  Don Gibson  <dgibson77@gmail.com>

        Reviewed by Nikolas Zimmermann.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12950
          Assertions.cpp should not #define macros that are already defined

        * wtf/Assertions.cpp: Don't #define WINVER and _WIN32_WINNT if they
        are already defined.

556 557 558 559 560 561 562 563 564
2007-03-02  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Anders.
        
        Add unsigned int hash traits (matches existing unsigned long version)

        * wtf/HashTraits.h:
        (WTF::):

aroben's avatar
aroben committed
565 566 567 568 569 570 571 572 573 574 575 576 577 578
2007-03-02  Adam Roben  <aroben@apple.com>

        Reviewed by Kevin M.

        Try to fix the Qt build.

        * kjs/DateMath.cpp:
        (KJS::msToGregorianDateTime): Removed unnecessary "struct" keyword.
        * kjs/DateMath.h: Moved forward declarations to the top of the file
        before they are used.
        * kjs/date_object.cpp:
        (KJS::formatLocaleDate): Changed to take a const GregorianDateTime&
        since GregorianDateTime is Noncopyable.

darin's avatar
darin committed
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596
2007-03-02  Darin Adler  <darin@apple.com>

        Reviewed by Kevin McCullough.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12867
          REGRESSION: BenchJS test 7 (dates) is 220% slower than in Safari 2.0.4

        * kjs/DateMath.h: Marked GregorianDateTime as noncopyable, since it has a non-trivial
        destructor and not the correspoding copy constructor or assignment operator.
        Changed the GregorianDateTime constructor to use member initialization syntax.
        Fixed the destructor to use the array delete operator, since timeZone is an array.

        * kjs/DateMath.cpp:
        (KJS::daysInYear): Changed to call isLeapYear so the rule is not repeated twice.
        (KJS::getUTCOffset): Added caching on PLATFORM(DARWIN), since we can rely on the
        notify_check function and "com.apple.system.timezone" to let us know when the
        offset has changed.

ggaren's avatar
ggaren committed
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621
2007-02-27  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Follow-up to fixing http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306>
        JS objects not collected after closing window @ ebay.com/maps.google.com
        
        Changed Interpreter cache of global constructors and prototypes from
        ProtectedPtrs to bare, marked pointers. ProtectedPtrs are inefficient,
        and they increase the risk of reference cycles. Also, Darin said something
        about ProtectedPtrs giving him warts.
        
        Also changed data members to precise types from generic JSObject*'s.
        
        Layout tests and JS tests pass.

        * kjs/SavedBuiltins.h:
        * kjs/interpreter.cpp:
        (KJS::Interpreter::init):
        (KJS::Interpreter::~Interpreter):
        (KJS::Interpreter::initGlobalObject): Moved Identifier::init() call to
        constructor, for clarity.
        (KJS::Interpreter::mark):
        * kjs/interpreter.h:

ggaren's avatar
ggaren committed
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644
2007-02-27  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306>
        JS objects not collected after closing window @ ebay.com/maps.google.com

        Don't GC in the Interpreter destructor. For that to work, the Interpreter
        would have to NULL out all of its ProtectedPtrs before calling collect(). But 
        we've decided that we don't want things to work that way, anyway. We want the
        client to be in charge of manual GC so that it can optimize cases when
        it will be destroying many interpreters at once
        (e.g., http://bugs.webkit.org/show_bug.cgi?id=12900).
        
        Also removed Interpreter::collect() because it was redundant with 
        Collector::collect().

        * JavaScriptCore.exp:
        * kjs/interpreter.cpp:
        (KJS::Interpreter::~Interpreter):
        * kjs/testkjs.cpp:
        (TestFunctionImp::callAsFunction):

kjk's avatar
kjk committed
645 646 647 648 649 650 651 652
2007-02-26  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by Adam Roben.

        Rename *_SUPPORT defines to ENABLE_*.

        * jscore.bkl:

mjs's avatar
mjs committed
653 654 655 656 657 658 659 660 661
2007-02-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Lars.
        
        - <rdar://problem/5021698> Disable experimental SVG features (12883)

        * wtf/Platform.h: Add ENABLE() macro similar to HAVE() and USE(), to
        allow nicer handling of optional WebKit features.

staikos's avatar
staikos committed
662 663 664 665 666 667 668 669 670 671
2007-02-22  George Staikos  <staikos@kde.org>

        Reviewed by Lars.

        Add return values

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):

weinig's avatar
weinig committed
672 673 674 675 676 677 678 679 680 681 682
2007-02-22  Oscar Cwajbaum  <public@oscarc.net>

        Reviewed by Maciej.

        Fix ARM-specific alignment problem in FastMalloc
        http://bugs.webkit.org/show_bug.cgi?id=12841

        * wtf/FastMalloc.cpp:
        Modify how pageheap_memory is declared to ensure proper alignment
        on architectures such as ARM

683 684 685 686 687 688 689 690 691 692 693
2007-02-20  Zack Rusin  <zrusin@trolltech.com>

        Reviewed by Lars

        Make sure that non-void methods always return something.

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):
        (WTF::Unicode::foldCase):

694 695 696 697 698 699 700 701 702 703 704 705
2007-02-18  Kevin Ollivier  <kevino@theolliviers.com>

        Reviewed by Adam Roben.

        Fix cases where MSVC-specific code was identified as Win32 platform
        code. (as it should be compiled for e.g. wx port when using MSVC too)
        
        * wtf/Assertions.h: 
        * wtf/MathExtras.h:
        * wtf/StringExtras.h:
        changed PLATFORM(WIN) sections to COMPILER(MSVC) as necessary

kjk's avatar
kjk committed
706 707 708 709 710 711 712 713 714 715
2007-02-17  Krzysztof Kowalczyk  <kkowalczyk@gmail.com>

        Reviewed by Adam Roben.

        Fix crashes on ARM due to different struct packing. Based on a patch
        by Mike Emmel.
        * kjs/ustring.cpp: compile-time assert to make sure sizeof(UChar) == 2
        * kjs/ustring.h: pack UChar struct to ensure that sizeof(UChar) == 2
        * wtf/Assertions.h: add COMPILE_ASSERT macro for compile-time assertions

staikos's avatar
staikos committed
716 717 718 719 720 721 722 723 724
2007-02-16  George Staikos  <staikos@kde.org>

        Reviewed by Maciej.

        Fix uninitialized variable

        * bindings/testbindings.cpp:
        (myAllocate):

andersca's avatar
andersca committed
725 726 727 728 729 730 731 732 733 734 735 736 737
2007-02-16  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Mitz.

        http://bugs.webkit.org/show_bug.cgi?id=12788
        REGRESSION: Going back one page in history has a noticeable delay
        
        Um...if all elements in two vectors are equal, then I guess we could say that
        the two vectors are equal too.
        
        * wtf/Vector.h:
        (WTF::):

andersca's avatar
andersca committed
738 739 740 741 742 743 744 745 746 747 748 749 750 751
2007-02-14  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        Add new canCompareWithMemcmp vector trait and use it to determine whether
        operator== can use memcmp.
        
        * wtf/Vector.h:
        (WTF::):
        (WTF::VectorTypeOperations::compare):
        (WTF::operator==):
        * wtf/VectorTraits.h:
        (WTF::):

beidson's avatar
beidson committed
752 753 754 755 756 757 758 759 760
2007-02-13  Brady Eidson  <beidson@apple.com>

        Reviewed by Darin
        
        Tweaked vector a bit

        * wtf/Vector.h:
        (WTF::operator==):

darin's avatar
darin committed
761 762 763 764 765 766 767 768 769 770 771 772
2007-02-13  Dex Deacon  <occupant4@gmail.com>

        Reviewed by Darin.

        - fix for http://bugs.webkit.org/show_bug.cgi?id=12750
          Vector operator== was not defined correctly. It returned void,
          did not accept const Vectors, and used an int instead of size_t. 

        * wtf/Vector.h: fixed comparison operators
        (WTF::operator==):
        (WTF::operator!=):

ddkilzer's avatar
ddkilzer committed
773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799
2007-02-10  David Carson  <dacarson@gmail.com>

        Reviewed by Maciej.

        - fix for http://bugs.webkit.org/show_bug.cgi?id=12636
        Corrected the generation of method signatures when the parameter
        is an Array. 
        Added support for converting a Javascript array to a Java array.

        * bindings/jni/jni_utility.h: added new type for array, array_type
        * bindings/jni/jni_runtime.cpp: add support for new array type
        (JavaField::valueFromInstance):
        (JavaField::setValueToInstance):
        (JavaMethod::JavaMethod):
        (JavaMethod::signature):
        * bindings/jni/jni_utility.cpp: add support for new array type
        (KJS::Bindings::callJNIMethod):
        (KJS::Bindings::callJNIStaticMethod):
        (KJS::Bindings::callJNIMethodIDA):
        (KJS::Bindings::JNITypeFromClassName):
        (KJS::Bindings::signatureFromPrimitiveType):
        (KJS::Bindings::JNITypeFromPrimitiveType):
        (KJS::Bindings::getJNIField):
        (KJS::Bindings::convertArrayInstanceToJavaArray): new method
        converts the Javascript array to the requested Java array.
        (KJS::Bindings::convertValueToJValue):

andersca's avatar
andersca committed
800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838
2007-02-08  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        <rdar://problem/4930614>
        Safari complains about "Slow Script" if GMail is left open and machine is busy
        
        <rdar://problem/4649516>
        Turn off slow script dialog or crank up time that makes it come up
        
        <rdar://problem/4963589>
        Slow script warning is displayed after closing of PROMPT or PRINT dialog
        
        Re-do the way script timeouts are handled. No longer use a unix timer that sends signals. Instead, add a 
        tick count and increment it in loop bodies. If the tick count reaches a threshold, do a timeout check. If the total time executing
        is higher than the timeout value, (possibly) interrupt the script. The timeout checker also adjusts the threshold dynamically
        to prevent doing the timeout check too often.
         
        * JavaScriptCore.exp:
        Remove pause and resume calls.
        
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Add winmm.lib.

        * kjs/interpreter.cpp:
        (KJS::Interpreter::init):
        (KJS::Interpreter::~Interpreter):
        (KJS::Interpreter::startTimeoutCheck):
        (KJS::Interpreter::stopTimeoutCheck):
        (KJS::Interpreter::resetTimeoutCheck):
        (KJS::getCurrentTime):
        (KJS::Interpreter::checkTimeout):
        * kjs/interpreter.h:
        (KJS::Interpreter::timedOut):
        * kjs/nodes.cpp:
        (DoWhileNode::execute):
        (WhileNode::execute):
        (ForNode::execute):

839 840 841 842
2007-02-07  Darin Adler  <darin@apple.com>

        * JavaScriptCore.vcproj/JavaScriptCore.sln: Reenable testkjs.

darin's avatar
darin committed
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859
2007-02-07  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - another build fix; this time for sure

        * pcre/pcre_exec.c: (match):
        The compiler caught an incorrect use of the othercase variable across
        a call to RMATCH in character repeat processing. Local variables can
        change in the crazy NO_RECURSE mode that we use, so we instead need
        the value in othercase to be in one of the special stack frame variables.
        Added a new stack frame variable for this purpose named repeat_othercase.
        Also noted a similar error in the non-UTF-16 side of the #ifdef, but
        didn't try to fix that one. Also removed a SUPPORT_UCP #ifdef from the
        PCRE_UTF16 side; that code doesn't work without the Unicde properties
        table, and we don't try to use it that way.

860 861 862 863 864 865
2007-02-06  Steve Falkenburg  <sfalken@apple.com>

        Disable testkjs in sln until we figure out mysterious compiler warning.

        * JavaScriptCore.vcproj/JavaScriptCore.sln:

866 867 868 869 870 871 872
2007-02-06  Steve Falkenburg  <sfalken@apple.com>

        Build fix by ggaren

        * pcre/pcre_exec.c:
        (match):

darin's avatar
darin committed
873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892
2007-02-06  Darin Adler  <darin@apple.com>

        Reviewed by Geoff.

        - fix <rdar://problem/4979089> PCRE should avoid setjmp/longjmp even when compiler
          is not GCC

        Added a new code path that's slower and way uglier but doesn't rely on GCC's
        computed gotos.

        * pcre/pcre_exec.c: Added a numeric parameter to the RMATCH function. It must be
        different at every RMATCH call site. Changed the non-GCC NO_RECURSE version of
        the macro to use a label incorporating the number. Changed the RRETURN macro to
        use a goto instead of longjmp.
        (match): Added a different number at each callsite, using a perl script for the
        first-time task. Going forward it should be easy to maintain by hand. Added a
        switch statement at the bottom of the function. We'll get compile time errors
        if we have anything in the switch statement that's never used in an RMATCH,
        but errors in the other direction are silent except at runtime.

darin's avatar
darin committed
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937
2007-02-06  Darin Adler  <darin@apple.com>

        Reviewed by John.

        - fix <rdar://problem/4687840> 9A241: JavaScript RegExp 25-30x slower than on 10.4.7

        I used Shark to figure out what to do. The test case is now 15% faster than with
        stock Safari. Some other regular expression cases might still be a few % slower
        than before, but the >10x slowdown is now completely gone.

        1) Fix slowness caused by setjmp/longjmp by using computed goto instead.

        Use GCC extensions - locally declared labels, labels as values, and computed goto -
        instead of using setjmp/longjmp to implemement non-recursive version of the regular
        expression system. We could probably make this even faster if we reduced the use
        of malloc a bit too.

        2) Fix slowness caused by allocating heapframe objects by allocating the first
           16 of them from the stack.

        3) Speed up use of malloc and free in PCRE by making it use fastMalloc and fastFree.

        4) Speed up the test case by adding a special case to a UString function.

        5) Made a small improvement to the innermost hottest loop of match by hoisting
           the conversion from int to pcre_uchar out of the loop.

        * JavaScriptCore.xcodeproj/project.pbxproj: Compile FastMallocPCRE.cpp, and don't
        compile pcre_globals.c.

        * wtf/FastMallocPCRE.cpp: Added. A copy of pcre_globals.c that uses FastMalloc.h.
        This is better than code that sets the PCRE allocation globals because by doing it
        this way there's guaranteed to be no problem with order of initialization.

        * kjs/ustring.cpp: (KJS::UString::spliceSubstringsWithSeparators): Add a fast
        special case when this is called for only one subrange and no seaprators. This
        was happening a lot in the test case and it seems quite reasonable to optimize this.

        * pcre/pcre_exec.c: Create a copy of the RMATCH and RRETURN macros that use goto
        instead of setjmp/longjmp. Change code that calls pcre_stack_malloc to first use
        storage on the stack inside the match function.
        (match): Move initialization of utf8 up a couple lines to avoid "possibly used
        uninitialized" warning. Use a local variable so we compare with pcre_uchar instead
        of with int inside the inner "find a character" loop.

938 939 940 941 942 943 944 945 946 947
2007-02-03  George Staikos  <staikos@kde.org>

        Reviewed by Alexey.

        -1 is not a valid point.  We can't handle anything > 0xffff anyway.
        Fixes crash on cases like eval("x");

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::category):

darin's avatar
darin committed
948 949 950 951 952 953 954 955 956 957 958 959 960 961 962
2007-02-02  Darin Adler  <darin@apple.com>

        Reviewed by Anders.

        - fix copying and assigning a ListHashSet

        No test because the code path with bugs I am fixing is not used yet.

        * wtf/ListHashSet.h: Tweaked ListHashSetNodeAllocator a little bit for clarity.
        Changed m_allocator to be an OwnPtr instead of doing an explicit delete.
        Fixed bug in copy constructor where we'd have an uninitialized m_allocator.
        Fixed bug in assignment operator where it would swap only the hash table, and
        not the head, tail, and allocator pointers.

2007-02-02  Geoffrey Garen  <ggaren@apple.com>
ggaren's avatar
ggaren committed
963 964 965 966 967 968 969 970 971

        Reviewed by Maciej Stachowiak.
        
        Use WTFLog instead of fprintf for logging KJS::Node leaks.

        * kjs/nodes.cpp:
        (NodeCounter::~NodeCounter): Changed count to unsigned, updated
        to match style guidelines.

mjs's avatar
mjs committed
972 973 974 975 976 977 978
2007-02-02  Maciej Stachowiak  <mjs@apple.com>

        - not reviewed, build fix

        * wtf/ListHashSet.h:
        (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator): ummm, use union correctly

mjs's avatar
mjs committed
979 980 981 982
2007-02-01  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Darin.
        
mjs's avatar
mjs committed
983
        - use a custom allocator for ListHashSet, to fix ~1% perf regression using it for form control
mjs's avatar
mjs committed
984 985 986 987 988 989 990 991 992 993 994 995 996 997 998

        * wtf/ListHashSet.h:
        (WTF::ListHashSetNodeAllocator::ListHashSetNodeAllocator):
        (WTF::ListHashSetNodeAllocator::allocate):
        (WTF::ListHashSetNodeAllocator::deallocate):
        (WTF::ListHashSetNode::operator new):
        (WTF::ListHashSetNode::operator delete):
        (WTF::ListHashSetNode::destroy):
        (WTF::ListHashSetTranslator::translate):
        (WTF::::ListHashSet):
        (WTF::::~ListHashSet):
        (WTF::::add):
        (WTF::::unlinkAndDelete):
        (WTF::::deleteAllNodes):

mjs's avatar
mjs committed
999 1000 1001 1002 1003 1004 1005 1006 1007
2007-01-31  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Adam.
        
        - fix sporadic crash

        * wtf/ListHashSet.h:
        (WTF::::remove): remove before deleting

mjs's avatar
mjs committed
1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071
2007-01-31  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Mark with help from Lars.
        
        - added new ListHashSet class, which combines a hashtable and a linked list to provide a set
        that keeps elements in inserted order
        
        This is to assist in fixing the following:
        <rdar://problem/4751164> REGRESSION: Safari places text on incorrect button when returning to a page via back [10541]
        http://bugs.webkit.org/show_bug.cgi?id=10541

        * JavaScriptCore.vcproj/WTF/WTF.vcproj:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/HashTable.h:
        (WTF::HashTable::find):
        (WTF::HashTable::contains):
        (WTF::::find):
        (WTF::::contains):
        * wtf/ListHashSet.h: Added.
        (WTF::ListHashSetNode::ListHashSetNode):
        (WTF::ListHashSetNodeHashFunctions::hash):
        (WTF::ListHashSetNodeHashFunctions::equal):
        (WTF::ListHashSetIterator::ListHashSetIterator):
        (WTF::ListHashSetIterator::get):
        (WTF::ListHashSetIterator::operator*):
        (WTF::ListHashSetIterator::operator->):
        (WTF::ListHashSetIterator::operator++):
        (WTF::ListHashSetIterator::operator--):
        (WTF::ListHashSetIterator::operator==):
        (WTF::ListHashSetIterator::operator!=):
        (WTF::ListHashSetIterator::operator const_iterator):
        (WTF::ListHashSetIterator::node):
        (WTF::ListHashSetConstIterator::ListHashSetConstIterator):
        (WTF::ListHashSetConstIterator::get):
        (WTF::ListHashSetConstIterator::operator*):
        (WTF::ListHashSetConstIterator::operator->):
        (WTF::ListHashSetConstIterator::operator++):
        (WTF::ListHashSetConstIterator::operator--):
        (WTF::ListHashSetConstIterator::operator==):
        (WTF::ListHashSetConstIterator::operator!=):
        (WTF::ListHashSetConstIterator::node):
        (WTF::ListHashSetTranslator::hash):
        (WTF::ListHashSetTranslator::equal):
        (WTF::ListHashSetTranslator::translate):
        (WTF::::ListHashSet):
        (WTF::::operator):
        (WTF::::~ListHashSet):
        (WTF::::size):
        (WTF::::capacity):
        (WTF::::isEmpty):
        (WTF::::begin):
        (WTF::::end):
        (WTF::::find):
        (WTF::::contains):
        (WTF::::add):
        (WTF::::remove):
        (WTF::::clear):
        (WTF::::unlinkAndDelete):
        (WTF::::appendNode):
        (WTF::::deleteAllNodes):
        (WTF::::makeIterator):
        (WTF::::makeConstIterator):
        (WTF::deleteAllValues):

1072 1073 1074 1075 1076 1077
2007-01-30  Darin Adler  <darin@apple.com>

        * kjs/DateMath.cpp: Fix license header to reflect LGPL as the first license
        mentioned. We still mention the option of using under MPL or GPL since some
        of this code came from the Mozilla project with those license terms.

1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088
2007-01-30  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        Turned JavaScriptCore from a separate library into an includable
        project, to combine it all into libWebKitQt.

        * JavaScriptCore.pri: Added.
        * JavaScriptCore.pro: Removed.
        * kjs/testkjs.pro:

ggaren's avatar
ggaren committed
1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117
2007-01-29  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.

        Fixed <rdar://problem/4485644> REGRESSION: JavaScriptCore has init routines
        
        The TCMalloc module now initializes, if needed, inside GetCache() and 
        fastMallocSetIsMultiThreaded(). We leverage the same synchronization 
        technique used for enabling / disabling the single-threaded optimization 
        to synchronize initialization of the library without requiring a lock 
        for every malloc.
        
        1,251 runs of tcmalloc_unittest, 2 runs of a custom, massively multi-threaded 
        tcmalloc_unittest, and my custom version of the PLT show no regressions.
        Super-accurate JS iBench reports a .24% regression, which is right at the
        limit of its error range, so I'm declaring victory.

        * wtf/FastMalloc.cpp:
        (WTF::fastMallocSetIsMultiThreaded): Initialize, if needed. (InitModule()
        checks the "if needed" part.)
        (WTF::TCMalloc_ThreadCache::GetCache): Restored original TCMalloc code
        inside #ifdef, for posterity. Added new initialization logic.
        (WTF::TCMalloc_ThreadCache::InitModule): Call InitTSD(), since we don't
        have a static initializer to call it for us, now. This means that fastMalloc
        is not usable as a general libc allocator, but it never was, and if it were
        the general libc allocator, we wouldn't be here in the first place, so whatever.
        (WTF::TCMalloc_ThreadCache::InitTSD): Don't try to take the pageheap_lock, 
        since InitModule already has it.

kmccullo's avatar
kmccullo committed
1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131
2007-01-29  Kevin McCullough  <KMcCullough@apple.com>

        Reviewed by Geoff and Oliver.

        - rdar://problem/4955561
        - missusing JavaScript shouldn't crash webkit.  Now it doesn't, in this case.

        * bindings/objc/objc_runtime.mm:
        (ObjcFallbackObjectImp::callAsFunction):
        * bindings/runtime_method.cpp:
        (RuntimeMethod::callAsFunction):
        * bindings/runtime_object.cpp:
        (RuntimeObjectImp::callAsFunction):

ggaren's avatar
ggaren committed
1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165
2007-01-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        First step in fixing <rdar://problem/4485644> REGRESSION: JavaScriptCore 
        has init routines
        
        Don't rely on a static initializer to store the main thread's ID (which
        we would use to detect allocations on secondary threads). Instead, require 
        the caller to notify fastMalloc if it might allocate on a secondary thread.
        
        Also fixed what seemed like a race condition in do_malloc.
        
        tcmalloc_unittest and my custom versions of JS iBench and PLT show no
        regressions.

        * wtf/FastMalloc.cpp:
        (WTF::fastMallocSetIsMultiThreaded): 
        (1) Renamed from "fastMallocRegisterThread", which was a misleading name because 
        not all threads need to register with fastMalloc -- only secondary threads 
        need to, and only for the purpose of disabling its single-threaded optimization. 

        (2) Use the pageheap_lock instead of a custom one, since we need to synchronize
        with the read of isMultiThreaded inside CreateCacheIfNecessary. This is a new
        requirement, now that we can't guarantee that the first call to CreateCacheIfNecessary
        will occur on the main thread at init time, before any other threads have been created.

        (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
        (WTF::do_malloc): Reverted WTF change only to call GetCache() if size <= kMaxSize.
        The WTF code would read phinited without holding the pageheap_lock, which
        seemed like a race condition. Regardless, calling GetCache reduces the number 
        of code paths to module initialization, which will help in writing the 
        final fix for this bug.

ddkilzer's avatar
ddkilzer committed
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182
2007-01-28  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=9815
          JavaScript TypeError loading Dean Edwards' JS compressor/obfuscator

        Creating a function using 'new Function()' was not setting its prototype with the
        same flags as 'function() { }'.

        Test: fast/js/function-prototype.html

        * kjs/function_object.cpp:
        (FunctionObjectImp::construct): Change flags from DontEnum|DontDelete|ReadOnly to
        Internal|DontDelete to match FuncDeclNode::processFuncDecl() and
        FuncExprNode::evaluate() in kjs/nodes.cpp.

ggaren's avatar
ggaren committed
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207
2007-01-27  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Beth Dakin.
        
        Added some missing JSLocks, which might fix <rdar://problem/4889707>.

        We need to lock whenever we might allocate memory because our FastMalloc
        implementation requires clients to register their threads, which we do
        through JSLock. 
        
        We also need to lock whenever modifying ref-counts because they're not 
        thread-safe.

        * API/JSObjectRef.cpp:
        (JSClassCreate): Allocates memory
        (JSClassRetain): Modifies a ref-count
        (JSClassRelease): Modifies a ref-count
        (JSPropertyNameArrayRetain): Modifies a ref-count
        (JSPropertyNameArrayRelease): Modifies a ref-count
        * API/JSStringRef.cpp:
        (JSStringRetain): Modifies a ref-count
        * API/JSValueRef.cpp:
        (JSValueIsInstanceOfConstructor): Might allocate memory if an exception
        is thrown.

1208 1209 1210 1211 1212 1213
2007-01-27  Lars Knoll <lars@trolltech.com>

        Fix the Qt build.

        * bindings/qt/qt_instance.h:

ggaren's avatar
ggaren committed
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321
2007-01-25  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/4608404> WebScriptObject's _rootObject lack 
        of ownership policy causes crashes (e.g., in Dashcode)
        
        The old model for RootObject ownership was either to (1) leak them or (2) assign
        them to a single owner -- the WebCore::Frame -- which would destroy them 
        when it believed that all of its plug-ins had unloaded.
        
        This model was broken because of (1) and also because plug-ins are not the only 
        RootObject clients. All Bindings clients are RootObjects clients, including 
        applications, which outlive any particular WebCore::Frame.
        
        The new model for RootObject ownership is to reference-count them, with a
        throw-back to the old model: The WebCore::Frame tracks the RootObjects
        it creates, and invalidates them when it believes that all of its plug-ins 
        have unloaded.
        
        We maintain this throw-back to avoid plug-in leaks, particularly from Java.
        Java is completely broken when it comes to releasing JavaScript objects. 
        Comments in our code allege that Java does not always call finalize when 
        collecting objects. Moreoever, my own testing reveals that, when Java does 
        notify JavaScript of a finalize, the data it provides is totally bogus.
        
        This setup is far from ideal, but I don't think we can do better without
        completely rewriting the bindings code, and possibly part of the Java
        plug-in / VM.
        
        Layout tests pass. No additional leaks reported. WebCore/manual-tests/*liveconnect*
        and a few LiveConnect demos on the web also run without a hitch.
        
        const RootObject* => RootObject*, since we need to ref/deref
        
        * bindings/NP_jsobject.cpp:
        (jsDeallocate): deref our RootObjects. Also unprotect or JSObject, instead
        of just relying on the RootObject to do it for us when it's invalidated.
        (_isSafeScript): Check RootObject validity.
        (_NPN_CreateScriptObject): ditto
        (_NPN_Invoke): ditto
        (_NPN_Evaluate): ditto
        (_NPN_GetProperty): ditto
        (_NPN_SetProperty): ditto
        (_NPN_RemoveProperty): ditto
        (_NPN_HasProperty): ditto
        (_NPN_HasMethod): ditto
        (_NPN_SetException): ditto

        * bindings/runtime_root.cpp: 
        Revived bit-rotted LIAR LIAR LIAR comment.
        
        LOOK: Added support for invalidating RootObjects without deleting them, 
        which is the main goal of this patch. 

        Moved protect counting into the RootObject class, to emphasize that 
        the RootObject protects the JSObject, and unprotects it upon being invalidated.
            addNativeReference => RootObject::gcProtect
            removeNativeReference => RootObject::gcUnprotect
            ProtectCountSet::contains => RootObject::gcIsProtected
            
        I know we'll all be sad to see the word "native" go.
        
        * bindings/runtime_root.h: Added ref-counting support to RootObject, with
        all the standard accoutrements.

        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertValueToNPVariant): If we can't find a valid RootObject,
        return void instead of just leaking.

        * bindings/jni/jni_instance.cpp:
        (JavaInstance::JavaInstance): Don't take a RootObject in our constructor;
        be like other Instances and require the caller to call setRootObject. This
        reduces the number of ownership code paths.
        (JavaInstance::invokeMethod): Check RootObject for validity.
        * bindings/jni/jni_instance.h: Removed private no-arg constructor. Having
        an arg constructor accomplishes the same thing.

        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::invoke): No need to call findProtectCountSet, because finalize()
        checks for RootObject validity.
        (JavaJSObject::JavaJSObject): check RootObject for validity
        (JavaJSObject::call): ditto
        (JavaJSObject::eval): ditto
        (JavaJSObject::getMember): ditto
        (JavaJSObject::setMember): ditto
        (JavaJSObject::removeMember): ditto
        (JavaJSObject::getSlot): ditto
        (JavaJSObject::setSlot): ditto
        (JavaJSObject::toString): ditto
        (JavaJSObject::finalize): ditto
        (JavaJSObject::createNative): No need to tell the RootObject to protect 
        the global object, since the RootObject already owns the interpreter.

        * bindings/jni/jni_runtime.cpp:
        (JavaArray::JavaArray): Removed copy construcutor becaue it was unused.
        Dead code is dangerous code.

        * bindings/objc/objc_runtime.mm: Added WebUndefined protocol. Previous use
        of WebScriptObject was bogus, because WebUndefined is not a subclass of
        WebScriptObject.
        (convertValueToObjcObject): If we can't find a valid RootObject,
        return nil instead of just leaking.

        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertValueToObjcValue): If we can't find a valid RootObject,
        return nil instead of just leaking.

aliceli1's avatar
aliceli1 committed
1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333
2007-01-27  Andrew Wellington  <proton@wiretapped.net>

        Reviewed by Maciej.
        
        Fix for Repeated string concatenation results in OOM crash
        http://bugs.webkit.org/show_bug.cgi?id=11131

        * kjs/operations.cpp:
        (KJS::add): Throw exception if string addition result is null
        * kjs/ustring.cpp:
        (KJS::UString::UString): Don't call memcpy when malloc failed

lars's avatar
lars committed
1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344
2007-01-25  Jan Kraemer  <camel@gmx.de>

        Reviewed by Maciej

        Fix for http://bugs.webkit.org/show_bug.cgi?id=12382

        Fix crash on architectures with 32 bit ints and
        64 bit longs (For example Linux on AMD64)

        * kjs/dtoa.cpp: #define Long int as suggested in comment

ggaren's avatar
ggaren committed
1345 1346 1347 1348 1349 1350
2007-01-24  Geoffrey Garen  <ggaren@apple.com>

        Fixed up #include order for style. No review necessary.

        * API/JSStringRef.cpp:

ggaren's avatar
ggaren committed
1351 1352 1353 1354 1355 1356 1357 1358
2007-01-24  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Copy JSStringRefCF, in case anybody wants to use it. (I just added
        it recently.)

mjs's avatar
mjs committed
1359 1360 1361 1362 1363 1364 1365
2007-01-24  Maciej Stachowiak  <mjs@apple.com>

        Not reviewed, trivial property change.
        
        * JavaScriptCore.vcproj/JavaScriptCore.sln: remove svn:mime-type
        property which made this binary.

bdash's avatar
bdash committed
1366 1367 1368 1369 1370 1371
2007-01-25  Mark Rowe  <mrowe@apple.com>

        Reviewed by Darin.

        * Info.plist: Update copyright string.

darin's avatar
darin committed
1372 1373 1374 1375 1376 1377 1378
2007-01-24  Darin Adler  <darin@apple.com>

        Reviewed by Mark Rowe.

        * JavaScriptCore.xcodeproj/project.pbxproj: Changed to /usr/sbin/sysctl
        so we don't rely on people's paths.

aliceli1's avatar
aliceli1 committed
1379 1380 1381 1382 1383 1384 1385
2007-01-23  Alice Liu  <alice.liu@apple.com>

        release build fix

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Copy APICasts.h

ggaren's avatar
ggaren committed
1386 1387 1388 1389 1390 1391 1392
2007-01-23  Geoffrey Garen  <ggaren@apple.com>

        build fix

        * API/JSStringRef.h:
        * JavaScriptCore.xcodeproj/project.pbxproj:

bdash's avatar
bdash committed
1393 1394 1395 1396
2007-01-24  Mark Rowe  <mrowe@apple.com>

        Build fix for DumpRenderTree.

bdash's avatar
bdash committed
1397
        * JavaScriptCore.xcodeproj/project.pbxproj: Make JSStringRefCF.h public so it's copied into built framework.
bdash's avatar
bdash committed
1398

andersca's avatar
andersca committed
1399 1400 1401 1402 1403 1404 1405
2007-01-23  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        Copy APICasts.h

ggaren's avatar
ggaren committed
1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435
2007-01-23  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Maciej Stachowiak.
        
        Fixed <rdar://problem/4885131> Move CFString function declarations from 
        JSStringRef.h to JSStringRefCF.h
        
        Also removed remaining API FIXMEs and changed them into Radars.

        * API/JSClassRef.cpp:
        (OpaqueJSClass::OpaqueJSClass): Added Radar numbers for UTF8 conversion.

        * API/JSContextRef.cpp:
        (JSGlobalContextCreate): Replaced FIXME for NULL JSContextRef with Radar number.

        * API/JSObjectRef.h: Removed FIXME, which is unprofessional in a public header.

        * API/JSStringRef.cpp: Moved CF related implementations to JSStringRefCF.cpp.
        (JSStringCreateWithUTF8CString): Replaced FIXME with Radar number.
        * API/JSStringRef.h: Moved CF related declarations to JSStringRefCF.h. Added
        #include of JSStringRefCF.h as a stopgap until clients start #including
        it as needed by themselves.

        * API/JSStringRefCF.cpp: Added.
        (JSStringCreateWithCFString):
        (JSStringCopyCFString): Replaced JSChar cast with UniChar cast, which is 
        more appropriate for a CF call.
        * API/JSStringRefCF.h: Added.
        * JavaScriptCore.xcodeproj/project.pbxproj:

1436 1437 1438 1439 1440 1441 1442 1443 1444
2007-01-18  Sanjay Madhav  <sanjay12@gmail.com>

        Reviewed by Darin.

        Add JavaScriptCore define to help with tracing of when objects are marked.

        * kjs/object.cpp:
        (KJS::JSObject::mark):

1445 1446 1447 1448 1449 1450 1451
2007-01-18  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        * JavaScriptCore.pro: Remove generated files on make clean.
        * pcre/pcre.pri:

ap's avatar
ap committed
1452 1453 1454 1455 1456 1457 1458 1459 1460
2007-01-16  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Maciej.

        http://bugs.webkit.org/show_bug.cgi?id=12268
        Give object prototypes their own names

        * kjs/lookup.h: Append "Prototype" to ClassName in KJS_IMPLEMENT_PROTOTYPE.

ggaren's avatar
ggaren committed
1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480
2007-01-16  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Darin Adler.
        
        Added re-entrency checking to GC allocation and collection. It is an error
        to allocate or collect from within a collection. We've had at least one 
        case of each bug in the past.
        
        Added a comment to the API header, explaining that API clients must not
        make this mistake, either.
        
        Layout tests and JS tests pass.

        * API/JSObjectRef.h:
        * kjs/collector.cpp:
        (KJS::GCLock::GCLock):
        (KJS::GCLock::~GCLock):
        (KJS::Collector::allocate):
        (KJS::Collector::collect):

bdash's avatar
bdash committed
1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496
2007-01-14  Mark Rowe  <mrowe@apple.com>

        Reviewed by Mitz.

        Minor fixes to JavaScript pretty-printing.

        * JavaScriptCore.exp:
        * kjs/Parser.cpp:
        (KJS::Parser::prettyPrint): Return line number and error message if parsing fails.
        * kjs/Parser.h:
        * kjs/nodes2string.cpp:
        (ElementNode::streamTo): Include comma delimiters in array literals.
        (PropertyNameNode::streamTo): Quote property names in object literals to handle the case when the property name is not a valid identifier.
        * kjs/testkjs.cpp:
        (doIt): Print any errors encountered while pretty-printing.

andersca's avatar
andersca committed
1497 1498 1499 1500 1501 1502 1503
2007-01-12  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        * wtf/HashTraits.h:
        Add hash traits for unsigned long and unsigned long long.

ggaren's avatar
ggaren committed
1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514
2007-01-12  Geoffrey Garen  <ggaren@apple.com>

        RS by Brady Eidson.
        
        Rolling back in r18786 with leaks fixed, and these renames slightly reworked:

        Because they can return 0:
        rootObjectForImp => findRootObject (overloaded for JSObject* and Interpreter*)
        rootObjectForInterpreter => findRootObject (ditto)
        findReferenceSet => findProtectCountSet

ggaren's avatar
ggaren committed
1515 1516 1517 1518 1519 1520
2007-01-11  Geoffrey Garen  <ggaren@apple.com>

        RS by Brady Eidson.
        
        Rolling out r18786 because it caused leaks.

ggaren's avatar
ggaren committed
1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556
2007-01-11  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Anders Carlsson.

        Even more cleanup in preparation for fixing <rdar://problem/4608404> 
        WebScriptObject's _executionContext lack of ownership policy causes 
        crashes (e.g., in Dashcode)
        
        Layout tests pass.
        
        Renames:
            ReferencesSet | ProtectCounts => ProtectCountSet (because it's a typename for a set of GC protect counts)
            ReferencesByRootMap => RootObjectMap (because RootObjectToProtectCountSetMap would have been confusing)
            pv => protectedValues
            rootObjectForImp => getRootObject (overloaded for JSObject* and Interpreter*)
            rootObjectForInterpreter => getRootObject (ditto)
            findReferenceSet => getProtectCountSet
            imp => jsObject
        
        (KJS::Bindings::getRootObjectMap): Changed to take advantage of built-in
        facility for initializing static variables.

        (KJS::Bindings::getProtectCountSet):
        (KJS::Bindings::destroyProtectCountSet): Added. Helps encapsulate the fact
        that getting a ProtectCountSet entails adding a RootObject to a hash table,
        and destroying one entails the reverse.

        (KJS::Bindings::getRootObject): Removed spurious NULL check.
        
        (KJS::Bindings::findReferenceSet): Renamed. Changed to use getRootObject()
        instead of iterating on its own.

        (KJS::Bindings::addNativeReference): Changed to use an early return instead
        of indenting the whole function.
        (KJS::Bindings::removeNativeReference): Ditto.

ggaren's avatar
ggaren committed
1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582
2007-01-11  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Anders Carlsson.

        Even more cleanup in preparation for fixing <rdar://problem/4608404> 
        WebScriptObject's _executionContext lack of ownership policy causes 
        crashes (e.g., in Dashcode)
        
        Layout tests pass.
        
        Renames:
            findRootObjectForNativeHandleFunction => createRootObject
            FindRootObjectForNativeHandleFunctionPtr => CreateRootObjectFunction
            
        Also removed unnecessary use of "Bindings::" prefix.

        * JavaScriptCore.exp:
        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::createNative):
        (JavaJSObject::convertValueToJObject):
        (JavaJSObject::convertJObjectToValue):
        * bindings/runtime_root.cpp:
        (KJS::Bindings::RootObject::setCreateRootObject):
        * bindings/runtime_root.h:
        (KJS::Bindings::RootObject::createRootObject):

staikos's avatar
staikos committed
1583 1584 1585 1586 1587 1588 1589 1590
2007-01-11  George Staikos  <staikos@kde.org>

        Reviewed by Maciej

        Appears to be Mac specific right now.

        * kjs/config.h:

1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621
2007-01-10  Lars Knoll <lars@trolltech.com>

        Reviewed by Zack

        Use the new functionality in Qt 4.3, to make
        the methods closer compliant with the Unicode
        spec.

        Keep the old code so that it still compiles against
        Qt 4.2.

        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):
        (WTF::Unicode::toTitleCase):
        (WTF::Unicode::foldCase):
        (WTF::Unicode::isFormatChar):
        (WTF::Unicode::isPrintableChar):
        (WTF::Unicode::isSeparatorSpace):
        (WTF::Unicode::isPunct):
        (WTF::Unicode::isDigit):
        (WTF::Unicode::isLower):
        (WTF::Unicode::isUpper):
        (WTF::Unicode::digitValue):
        (WTF::Unicode::mirroredChar):
        (WTF::Unicode::combiningClass):
        (WTF::Unicode::decompositionType):
        (WTF::Unicode::umemcasecmp):
        (WTF::Unicode::direction):
        (WTF::Unicode::category):

darin's avatar
darin committed
1622 1623 1624 1625 1626 1627
2007-01-09  Darin Adler  <darin@apple.com>

        - update 2007 Apple copyright for the new company name

        * kjs/DateMath.cpp:

darin's avatar
darin committed
1628 1629 1630 1631 1632 1633 1634
2007-01-09  Darin Adler  <darin@apple.com>

        - fix build

        * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction):
        Actually compile it this time.

darin's avatar
darin committed
1635 1636 1637 1638 1639 1640 1641
2007-01-09  Darin Adler  <darin@apple.com>

        - fix build

        * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction):
        Change types.

1642 1643 1644 1645 1646 1647 1648
2007-01-09  Darin Adler  <darin@apple.com>

        - fix build on platforms where Unicode::UChar is != uint16_t

        * kjs/string_object.cpp: (KJS::StringProtoFunc::callAsFunction):
        Change types.

ap's avatar
ap committed
1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663
2007-01-09  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - changes for http://bugs.webkit.org/show_bug.cgi?id=11078
          Forms Don't Submit (ASP Pages)

        * JavaScriptCore.exp:
        * kjs/value.cpp:
        (KJS::JSValue::toInt32): Folded toInt32Inline into this method, which was its
        only caller.
        (KJS::JSValue::toUInt32): Added a variant that reports if the conversion has
        succeeded.
        * kjs/value.h:

darin's avatar
darin committed
1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689
2007-01-09  Darin Adler  <darin@apple.com>

        Reviewed by Maciej.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12174
          improve Unicode use (less WTF::Unicode:: prefix, centralized character names)

        * wtf/unicode/icu/UnicodeIcu.h: Change parameter and return types
        to UChar32 and UChar. Removed unneeded type casts and added some
        const to functions that lacked it. Removed WTF::Unicode::memcmp.
        (WTF::Unicode::umemcasecmp): Renamed from strcasecmp since this
        doesn't work on 0-terminated strings as the str functions do.
        * wtf/unicode/qt4/UnicodeQt4.h: Ditto.

        - got rid of namespace prefixes from most uses of WTF::Unicode

        * kjs/function.cpp:
        (KJS::isStrWhiteSpace):
        (KJS::escapeStringForPrettyPrinting):
        * kjs/lexer.cpp:
        (KJS::Lexer::isWhiteSpace):
        (KJS::Lexer::isIdentStart):
        (KJS::Lexer::isIdentPart):
        * kjs/string_object.cpp:
        (KJS::StringProtoFunc::callAsFunction):

ddkilzer's avatar
ddkilzer committed
1690 1691 1692 1693 1694 1695 1696 1697 1698 1699
2007-01-07  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11917
          setlocale() can return null

        * kjs/date_object.cpp:
        (KJS::DateProtoFunc::callAsFunction): Removed dead code.

ddkilzer's avatar
ddkilzer committed
1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721
2007-01-07  David Carson  <dacarson@gmail.com>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12100
          JNI bindings should be available to non-Mac platforms that have JNI

        Change JNI so that it is not wrapped in the PLATFORM(MAC) ifdef, enabling
        other platforms who have JNI to use it.

        * bindings/jni/jni_instance.h:  
          Removed unnecessary include of <CoreFoundation/CoreFoundation.h>
        * bindings/jni/jni_utility.cpp:
        (KJS::Bindings::setJavaVM):
        * bindings/jni/jni_utility.h:
          Added new method for clients to set the JavaVM
        * bindings/runtime.cpp:
        (KJS::Bindings::Instance::createBindingForLanguageInstance):
          Changed code to utilize new #if HAVE(JNI)
        * kjs/config.h:
          Added new #define for JNI, ie HAVE_JNI

ddkilzer's avatar
ddkilzer committed
1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734
2007-01-07  David Carson  <dacarson@gmail.com>

        Reviewed by Darin.

        Fix http://bugs.webkit.org/show_bug.cgi?id=11431
        ARM platform has some byte alignment issues

        Fix for NaN being 4 bytes and it must start on a byte boundary
        for ARM architectures.

        * kjs/fpconst.cpp:
        (KJS::):

kmccullo's avatar
kmccullo committed
1735 1736 1737 1738 1739 1740 1741 1742 1743 1744
2007-01-04  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Kevin McCullough.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12070
          REGRESSION: KJS::getUTCOffset() caches UTC offset but ignores time zone changes

        * kjs/DateMath.cpp:
        (KJS::getUTCOffset): Don't cache UTC offset.

1745 1746 1747 1748 1749 1750 1751 1752 1753
2007-01-02  Darin Adler  <darin@apple.com>

        - minor tweak (hope this doesn't re-break Windows)

        * pcre/pcre_compile.c: Removed use of const pcre_uchar const * -- Mitz probably
        meant const pcre_uchar *const, but I think we can do without the explicit const here.

        * pcre/pcre_internal.h: Re-enabled warning C4114.

ddkilzer's avatar
ddkilzer committed
1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766
2007-01-02  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by NOBODY (Windows build fix).

        The MSVC compiler requires variables to be declared at the top of the enclosing block in C source.

        Disable this warning to prevent MSVC from complaining about the 'const pcre_uchar const *' type:
        warning C4114: same type qualifier used more than once

        * pcre/pcre_compile.c:
        (pcre_compile2): Moved variable declarations to top of their respective enclosing blocks.
        * pcre/pcre_internal.h: Added pragma to disable compiler warning.

ddkilzer's avatar
ddkilzer committed
1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797
2007-01-01  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11849
          REGRESSION (r18182): Google Calendar is broken (a regular expression containing a null character is not parsed correctly)

        Modified pcre_compile() (and the functions that it calls) to work with patterns
        containing null characters.

        Covered by JavaScriptCore tests ecma_3/RegExp/octal-002.js and ecma_3/RegExp/regress-85721.js

        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp): Changed to not null-terminate the pattern string and instead
        pass its length to pcre_compile.
        * pcre/pcre.h:
        * pcre/pcre_compile.c:
        (check_escape):
        (get_ucp):
        (is_counted_repeat):
        (check_posix_syntax):
        (compile_branch):
        (compile_regex):
        (pcre_compile): Added a parameter specifying the length of the pattern, which
        is no longer required to be null-terminated and may contain null characters. 
        (pcre_compile2):
        * pcre/pcre_internal.h:
        * tests/mozilla/expected.html: Updated for the two tests that this patch
        fixes. Also updated failing results for ecma_3/RegExp/regress-100199.js
        which were not updated after bug 6257 was fixed.

ddkilzer's avatar
ddkilzer committed
1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816
2007-01-01  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Darin.

        - fix http://bugs.webkit.org/show_bug.cgi?id=12057
          REGRESSION: JavaScript Date Is One Day In The Future in GMT time zone

        Because Mac OS X returns geographically and historically accurate time zone information,
        converting Jan 02, 1970 12:00:00 AM to local time then subtracting 24 hours did not work
        in GMT (London - England) since it was in BST (+0100) all year in 1970[1].  Instead, the
        UTC offset is calculated by converting Jan 01, 2000 12:00:00 AM to local time then
        subtracting that from the same date in UTC.

        [1] http://en.wikipedia.org/wiki/British_Summer_Time

        * kjs/DateMath.cpp:
        (KJS::getUTCOffset): Updated UTC offset calculation.
        (KJS::getDSTOffset): Improved comment.

ddkilzer's avatar
ddkilzer committed
1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856
2006-12-31  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Geoff.

        Update embedded pcre library from version 6.2 to 6.4.  Changes from pcre 6.2 to 6.3
        did not include any files in JavaScriptCore/pcre.

        All changes include renaming EXPORT to PCRE_EXPORT, renaming of ucp_findchar() to
        _pcre_ucp_findchar(), or comment changes.  Additional changes noted below.

        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Updated source file list.
        * JavaScriptCore.xcodeproj/project.pbxproj: Renamed pcre_printint.c to pcre_printint.src
        and changed it from a source file to a header file.
        * JavaScriptCoreSources.bkl: Updated source file list.
        * pcre/CMakeLists.txt: Updated source file list.
        * pcre/pcre-config.h:
        * pcre/pcre.h: Updated version.
        * pcre/pcre.pri: Updated source file list.
        * pcre/pcre_compile.c: Include pcre_printint.src #if DEBUG.
        (pcre_compile2):
        * pcre/pcre_config.c:
        * pcre/pcre_exec.c:
        (match):
        * pcre/pcre_fullinfo.c:
        * pcre/pcre_info.c:
        * pcre/pcre_internal.h: Added header guard.  Removed export of _pcre_printint().
        * pcre/pcre_ord2utf8.c:
        * pcre/pcre_printint.c: Renamed to pcre_printint.src.
        * pcre/pcre_printint.src: Added.  Renamed _pcre_printint() to pcre_printint().
        * pcre/pcre_refcount.c:
        * pcre/pcre_study.c:
        * pcre/pcre_tables.c:
        * pcre/pcre_try_flipped.c:
        * pcre/pcre_ucp_findchar.c: Added contents of ucp_findchar.c.
        * pcre/pcre_version.c:
        * pcre/pcre_xclass.c:
        (_pcre_xclass):
        * pcre/ucp.h: Removed export of ucp_findchar().
        * pcre/ucp_findchar.c: Removed.  Contents moved to pcre_ucp_findchar.c.

1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880
2006-12-29  David Kilzer  <ddkilzer@webkit.org>

        Reviewed by Geoff.

        Update embedded pcre library from version 6.1 to 6.2.  From the pcre ChangeLog:

        3. Added "b" to the 2nd argument of fopen() in dftables.c, for non-Unix-like
           operating environments where this matters.

        5. Named capturing subpatterns were not being correctly counted when a pattern
           was compiled. This caused two problems: (a) If there were more than 100
           such subpatterns, the calculation of the memory needed for the whole
           compiled pattern went wrong, leading to an overflow error. (b) Numerical
           back references of the form \12, where the number was greater than 9, were
           not recognized as back references, even though there were sufficient
           previous subpatterns.

        * pcre/dftables.c: Item 3.
        (main):
        * pcre/pcre.h: Updated version.
        * pcre/pcre_compile.c: Item 5.
        (read_repeat_counts):
        (pcre_compile2):

ggaren's avatar
ggaren committed
1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918
2006-12-29  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Brian Dash... err... Mark Rowe.

        More cleanup in preparation for fixing <rdar://problem/4608404> 
        WebScriptObject's _executionContext lack of ownership policy causes 
        crashes (e.g., in Dashcode)
        
        The key change here is to RootObject::RootObject().
        
        * JavaScriptCore.exp:

        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertValueToNPVariant): Changed to use new constructor.

        * bindings/jni/jni_jsobject.cpp:
        (JavaJSObject::createNative): Changed to use new constructor. Replaced
        large 'if' followed by default condition with "if !" and explicit default
        condition.

        * bindings/objc/objc_runtime.mm:
        (convertValueToObjcObject): Changed to use new constructor.

        * bindings/runtime_root.cpp:
        (KJS::Bindings::RootObject::destroy): "removeAllNativeReferences" => "destroy"
        because this function actually destroys the RootObject.

        * bindings/runtime_root.h: Changed Interpreter* to RefPtr<Interpreter>
        to prevent a RootObject from holding a stale Interperter*.
        
        (KJS::Bindings::RootObject::RootObject): Changed constructor to take an 
        Interpreter*, since it's pointless to create a RootObject without one.
        Removed setRootObjectImp() and rootObjectImp() because they were just
        a confusing way of setting and getting the Interpreter's global object.

        (KJS::Bindings::RootObject::nativeHandle): "_nativeHandle" => "m_nativeHandle"
        (KJS::Bindings::RootObject::interpreter): "_interpreter" => "m_interpreter"

1919 1920 1921 1922 1923 1924 1925
2006-12-28  George Staikos  <staikos@kde.org>

        Reviewed by Olliej.

        * bindings/qt/qt_instance.cpp: build
        (KJS::Bindings::QtInstance::QtInstance):

ggaren's avatar
ggaren committed
1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942
2006-12-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Oliver Hunt.
        
        More cleanup. Layout tests pass.
        
        Use a helper function to initialize and access WebUndefined and WebScriptObject.

        * bindings/objc/objc_runtime.h:
        * bindings/objc/objc_runtime.mm:
        (KJS::Bindings::webScriptObjectClass):
        (KJS::Bindings::webUndefinedClass):
        (convertValueToObjcObject):
        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertValueToObjcValue):
        (KJS::Bindings::convertObjcValueToValue):

ggaren's avatar
ggaren committed
1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980
2006-12-28  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Brady Eidson.
        
        Some cleanup in preparation for fixing <rdar://problem/4608404> 
        WebScriptObject's _executionContext lack of ownership policy causes 
        crashes (e.g., in Dashcode)
        
        I'm just trying to make heads or tails of this baffling code.
        
        Renamed "root" | "execContext" | "executionContext" => "rootObject", because
        that's the object's (admittedly vague) type name.
        
        * bindings/runtime.cpp: Removed createLanguageInstanceForValue
        because I'll give you a dollar if you can explain to me what it actually did.
        
        * bindings/runtime_root.cpp: Put everything in the KJS::Bindings namespace,
        removing the KJS::Bindings prefix from individual functions and datatypes.
        This matches the header and eliminates a lot of syntax cruft.
        
        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertValueToNPVariant): Replaced use of createLanguageInstanceForValue
        with call to _NPN_CreateScriptObject because that's what createLanguageInstanceForValue
        actually did (but don't ask me for that dollar now; that's cheating.)

        * bindings/objc/objc_utility.h:
        * bindings/objc/objc_utility.mm:
        (KJS::Bindings::convertValueToObjcValue): Removed. Its only purpose was 
        to call a single function for WebKit, which WebKit can do on its own.

        * kjs/interpreter.h: Removed rtti() because it was unused, and this class
        is scheduled for demolition anyway.
        
        * kjs/interpreter.cpp: Removed createLanguageInstanceForValue because it had
        nothing to do with the Interpreter, and nothing makes Chuck Norris more mad
        than a function whose sole purpose is to call another function of the same
        name. (Really, I asked him.)

ggaren's avatar
ggaren committed
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003
2006-12-26  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Eric Seidel.

        Some cleanup in preparation for fixing <rdar://problem/4740328> Safari 
        crash on quit in _NPN_ReleaseObject from KJS::Bindings::CInstance::~CInstance

        * bindings/c/c_instance.cpp:
        * bindings/c/c_instance.h: Removed unused copy constructor and assignment
        operator. They made tracking data flow more difficult. Unused code is also 
        dangerous because it can succumb to bit rot with the stealth of a Ninja.
        
        Replaced #include with forward declaration to reduce header dependency.
        
        * bindings/npruntime.cpp: Sorted #includes.
        (_NPN_GetStringIdentifier): Replaced assert with ASSERT.
        (_NPN_GetStringIdentifiers): ditto
        (_NPN_ReleaseVariantValue): ditto
        (_NPN_CreateObject): ditto
        (_NPN_RetainObject): ditto
        (_NPN_ReleaseObject): ditto
        (_NPN_DeallocateObject): ditto

andersca's avatar
andersca committed
2004 2005 2006 2007 2008 2009
2006-12-20  Anders Carlsson  <acarlsson@apple.com>

        * kjs/string_object.cpp:
        (localeCompare):
        Another speculative Win32 fix.

andersca's avatar
andersca committed
2010 2011 2012 2013 2014 2015
2006-12-20  Anders Carlsson  <acarlsson@apple.com>

        * kjs/string_object.cpp:
        (localeCompare):
        Speculative Win32 fix.

andersca's avatar
andersca committed
2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032
2006-12-20  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Darin.

        <rdar://problem/4235733>
        <http://bugs.webkit.org/?show_bug.cgi?id=10193>
        support String.localeCompare.
        
        Implement localeCompare.
        
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/string_object.cpp:
        (localeCompare):
        (StringProtoFunc::callAsFunction):
        * kjs/string_object.h:
        (KJS::StringProtoFunc::):

thatcher's avatar
thatcher committed
2033 2034 2035 2036 2037 2038
2006-12-20  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Mark Rowe.

        * JavaScriptCore.xcodeproj/project.pbxproj: use GCC 4.0 for all the other test targets

thatcher's avatar
thatcher committed
2039 2040 2041 2042 2043 2044 2045 2046
2006-12-20  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Mark Rowe.

        <rdar://problem/4871613> JavaScriptCore-421.31's dftables target needs to override default compiler and use gcc-4.0

        * JavaScriptCore.xcodeproj/project.pbxproj:

2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108
2006-12-20  Lars Knoll <lars@trolltech.com>

        Reviewed by David Hyatt

        Added support to bind QObject's to 
        JavaScript.

        * JavaScriptCore.pro:
        * bindings/qt/qt_class.cpp: Added.
        (KJS::Bindings::QtClass::QtClass):
        (KJS::Bindings::QtClass::~QtClass):
        (KJS::Bindings::QtClass::classForObject):
        (KJS::Bindings::QtClass::name):
        (KJS::Bindings::QtClass::methodsNamed):
        (KJS::Bindings::QtClass::fieldNamed):
        * bindings/qt/qt_class.h: Added.
        (KJS::Bindings::QtClass::constructorAt):
        (KJS::Bindings::QtClass::numConstructors):
        * bindings/qt/qt_instance.cpp: Added.
        (KJS::Bindings::QtInstance::QtInstance):
        (KJS::Bindings::QtInstance::~QtInstance):
        (KJS::Bindings::QtInstance::operator=):
        (KJS::Bindings::QtInstance::getClass):
        (KJS::Bindings::QtInstance::begin):
        (KJS::Bindings::QtInstance::end):
        (KJS::Bindings::QtInstance::implementsCall):
        (KJS::Bindings::QtInstance::invokeMethod):
        (KJS::Bindings::QtInstance::invokeDefaultMethod):
        (KJS::Bindings::QtInstance::defaultValue):
        (KJS::Bindings::QtInstance::stringValue):
        (KJS::Bindings::QtInstance::numberValue):
        (KJS::Bindings::QtInstance::booleanValue):
        (KJS::Bindings::QtInstance::valueOf):
        * bindings/qt/qt_instance.h: Added.
        (KJS::Bindings::QtInstance::getObject):
        * bindings/qt/qt_runtime.cpp: Added.
        (KJS::Bindings::convertValueToQVariant):
        (KJS::Bindings::convertQVariantToValue):
        (KJS::Bindings::QtField::name):
        (KJS::Bindings::QtField::valueFromInstance):
        (KJS::Bindings::QtField::setValueToInstance):
        * bindings/qt/qt_runtime.h: Added.
        (KJS::Bindings::QtField::QtField):
        (KJS::Bindings::QtField::type):
        (KJS::Bindings::QtMethod::QtMethod):
        (KJS::Bindings::QtMethod::name):
        (KJS::Bindings::QtMethod::numParameters):
        * bindings/runtime.cpp:
        (KJS::Bindings::Instance::createBindingForLanguageInstance):
        * bindings/runtime.h:
        (KJS::Bindings::Instance::):
        * bindings/testbindings.pro: Added.
        * bindings/testqtbindings.cpp: Added.
        (MyObject::MyObject):
        (MyObject::setTestString):
        (MyObject::setTestInt):
        (MyObject::testString):
        (MyObject::testInt):
        (MyObject::foo):
        (Global::className):
        (main):

andersca's avatar
andersca committed
2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122
2006-12-19  Anders Carlsson  <acarlsson@apple.com>

        Reviewed by Geoff.

        Add -p option to testkjs which pretty prints the files instead of executing them.

        * JavaScriptCore.exp:
        * JavaScriptCore.xcodeproj/project.pbxproj:
        * kjs/Parser.cpp:
        (KJS::Parser::prettyPrint):
        * kjs/Parser.h:
        * kjs/testkjs.cpp:
        (doIt):

beidson's avatar
beidson committed
2123 2124 2125 2126 2127 2128 2129 2130
2006-12-19  Brady Eidson  <beidson@apple.com>

        Rubberstamped by Lou
        
        Removed unneccessary "else"

        * wtf/Assertions.cpp:

thatcher's avatar
thatcher committed
2131 2132 2133 2134 2135 2136 2137 2138
2006-12-19  Timothy Hatcher  <timothy@apple.com>

        Reviewed by Darin.

        <rdar://problem/4891774> Local WebCore/WebBrowser builds fail in 9A328 due to warning about ObjC-2.0 language features

        * JavaScriptCore.xcodeproj/project.pbxproj:

2139 2140 2141 2142 2143 2144 2145
2006-12-17  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Zack.

        * kjs/testkjs.pro: Oops, make it also build on machines other than
        mine :)

2146 2147 2148 2149 2150 2151
2006-12-17  Simon Hausmann  <hausmann@kde.org>

        Reviewed by Rob Buis.

        * kjs/testkjs.pro: Added .pro file to build testkjs.

ap's avatar
ap committed
2152 2153 2154 2155 2156 2157 2158 2159 2160
2006-12-16  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Rob.

        A deleted object was accessed to prepare RegExp construction error messages.

        * kjs/regexp_object.cpp:
        (RegExpObjectImp::construct): Wrap the RegExp into an OwnPtr.

ap's avatar
ap committed
2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173
2006-12-16  Mitz Pettel  <mitz@webkit.org>

        Reviewed by Alexey.

        - fix http://bugs.webkit.org/show_bug.cgi?id=11814
          REGRESSION(r18098): Find does not work with capital letters

        Test: editing/execCommand/findString-3.html

        * wtf/unicode/icu/UnicodeIcu.h:
        (WTF::Unicode::foldCase): Changed to not return an error if the result fits
        in the buffer without a null terminator.

mjs's avatar
mjs committed
2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186
2006-12-13  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Anders.
        
        - added equality and inequality operations for HashMap and Vector, useful for comparing more complex types

        * wtf/HashMap.h:
        (WTF::operator==):
        (WTF::operator!=):
        * wtf/Vector.h:
        (WTF::operator==):
        (WTF::operator!=):

2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211
2006-12-12  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Geoff. Based on a patch by Maks Orlovich.

        http://bugs.webkit.org/show_bug.cgi?id=6257
        Throw errors on invalid expressions (KJS merge)

        * kjs/regexp.cpp:
        (KJS::RegExp::RegExp):
        (KJS::RegExp::~RegExp):
        (KJS::RegExp::match):
        * kjs/regexp.h:
        (KJS::RegExp::flags):
        (KJS::RegExp::isValid):
        (KJS::RegExp::errorMessage):
        (KJS::RegExp::subPatterns):
        Remember and report RegExp construction failures. Renamed data members not to start with underscores.

        * kjs/regexp_object.cpp:
        (RegExpObjectImp::construct): Raise an exception if RegExp construction fails.
        (RegExpObjectImp::callAsFunction): Removed an obsolete comment.

        * tests/mozilla/ecma_3/RegExp/regress-119909.js: Reduced the number of nested parentheses to 
        a value supported by PCRE.

2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222
2006-12-11  Alexey Proskuryakov  <ap@webkit.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=9673
        Add support for window.atob() and window.btoa()

        * JavaScriptCore.exp: Export UString::is8Bit().
        * JavaScriptCore.xcodeproj/project.pbxproj: Added StringExtras.h as 
        a private header.

darin's avatar
darin committed
2223 2224 2225 2226 2227 2228 2229
2006-12-11  Darin Adler  <darin@apple.com>

        Reviewed by Brady.

        * JavaScriptCore.xcodeproj/project.pbxproj: Let Xcode update this
        (I think Hyatt is using an old Xcode).

2230 2231 2232 2233 2234 2235 2236 2237 2238 2239
2006-12-11  David Hyatt  <hyatt@apple.com>

        Fix the failing layout test.  Just remove Unicode::isSpace and
        revert StringImpl to do the same thing it was doing before.

        Reviewed by darin

        * wtf/unicode/icu/UnicodeIcu.h:
        * wtf/unicode/qt4/UnicodeQt4.h:

2240 2241 2242 2243 2244 2245 2246 2247
2006-12-09  George Staikos  <staikos@kde.org>

        Reviewed by Zack.

        Fix bison again on qmake build.

        * JavaScriptCore.pro:

2248 2249 2250 2251 2252 2253 2254 2255 2256 2257
2006-12-09  Lars Knoll <lars@trolltech.com>

        Reviewed by Zack

        Make it possible to build WebKit with qmake.

        * JavaScriptCore.pro: Added.
        * kjs/kjs.pro: Removed.
        * pcre/pcre.pri: Added.

2258 2259 2260 2261 2262 2263
2006-12-09  Zack Rusin  <zack@kde.org>

        Fixing the compilation with platform kde after the icu changes.

        * CMakeLists.txt:

aroben's avatar
aroben committed
2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281
2006-12-09  Adam Roben  <aroben@apple.com>

        Reviewed by Darin.

        Some updates in reaction to r18098.

        * wtf/unicode/icu/UnicodeIcu.h: Use !! to convert UBool to bool in all
        cases.
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):
        (WTF::Unicode::isDigit):
        (WTF::Unicode::isSpace):
        (WTF::Unicode::isPunct):
        (WTF::Unicode::isLower):
        (WTF::Unicode::isUpper):
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
        * JavaScriptCore.vcproj/WTF/WTF.vcproj:

2282 2283 2284 2285 2286 2287 2288 2289 2290
2006-12-09  George Staikos  <staikos@kde.org>

        Patch by Lars Knoll, comment out ICU dependency on Qt platform (unused code).

        Reviewed by Darin.

        * bindings/c/c_utility.cpp:
        (KJS::Bindings::convertUTF8ToUTF16):

hyatt's avatar
hyatt committed
2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338
2006-12-08  David Hyatt  <hyatt@apple.com>

        Land the new ICU abstraction layer.  Patch by Lars.

        Reviewed by me

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/Platform.h:
        * wtf/unicode/UnicodeCategory.h: Removed.
        * wtf/unicode/UnicodeDecomposition.h: Removed.
        * wtf/unicode/UnicodeDirection.h: Removed.
        * wtf/unicode/icu/UnicodeIcu.h:
        (WTF::Unicode::):
        (WTF::Unicode::foldCase):
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):
        (WTF::Unicode::toTitleCase):
        (WTF::Unicode::isDigit):
        (WTF::Unicode::isSpace):
        (WTF::Unicode::isPunct):
        (WTF::Unicode::mirroredChar):
        (WTF::Unicode::category):
        (WTF::Unicode::direction):
        (WTF::Unicode::isLower):
        (WTF::Unicode::isUpper):
        (WTF::Unicode::digitValue):
        (WTF::Unicode::combiningClass):
        (WTF::Unicode::decompositionType):
        (WTF::Unicode::strcasecmp):
        (WTF::Unicode::memset):
        * wtf/unicode/qt4/UnicodeQt4.cpp: Removed.
        * wtf/unicode/qt4/UnicodeQt4.h:
        (WTF::Unicode::):
        (WTF::Unicode::toLower):
        (WTF::Unicode::toUpper):
        (WTF::Unicode::toTitleCase):
        (WTF::Unicode::foldCase):
        (WTF::Unicode::isPrintableChar):
        (WTF::Unicode::isLower):
        (WTF::Unicode::isUpper):
        (WTF::Unicode::digitValue):
        (WTF::Unicode::combiningClass):
        (WTF::Unicode::decompositionType):
        (WTF::Unicode::strcasecmp):
        (WTF::Unicode::memset):
        (WTF::Unicode::direction):
        (WTF::Unicode::category):

thatcher's avatar
thatcher committed
2339 2340
=== Safari-521.32 ===

aroben's avatar
aroben committed
2341 2342 2343 2344
2006-12-08  Adam Roben  <aroben@apple.com>

        Reviewed by Anders.

aroben's avatar
aroben committed
2345
        This is a mo' better fix for ensuring we don't use macro definitions
aroben's avatar
aroben committed
2346 2347 2348 2349 2350
        of min/max.

        * kjs/config.h:
        * wtf/Vector.h:

2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369
2006-12-07  Kevin Fyure  <digdog@macports.org>

        Reviewed by Darin.

        http://bugs.webkit.org/show_bug.cgi?id=11545
        Disable the testcases do not follow the ECMA-262v3 specification.
        
        * tests/mozilla/expected.html: Update Results.
        * tests/mozilla/js1_2/String/concat.js:
        4 tests disabled. The result of concat Array object is not followinig
        ECMA 15.5.4.6
        * tests/mozilla/js1_2/function/Number.js:
        1 test disabled. The result of Array object to Number object conversion 
        is not following ECMA 9.3. And the test was duplicated in 
        ecma/TypeConversion/9.3-1.js
        * tests/mozilla/js1_2/function/String.js:
        2 tests disabled. The result of Object/Array object to String object 
        conversion is not following ECMA 15.5.1.1 and ECMA 9.8

2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380
2006-11-30  Steve Falkenburg  <sfalken@apple.com>

        Reviewed by Oliver.
        
        Move WTF from JavaScriptCore project into a new WTF project.

        * JavaScriptCore.vcproj/JavaScriptCore.sln: Add WTF.vcproj to sln
        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Remove WTF source files
        * JavaScriptCore.vcproj/WTF/WTF.vcproj: Added.
        * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: Add dependency on WTF.lib

ggaren's avatar
ggaren committed
2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391
2006-11-30  Geoffrey Garen  <ggaren@apple.com>

        Reviewed by Beth Dakin.
        
        Fixed up garbage collection at window close time.

        * kjs/interpreter.cpp:
        (KJS::Interpreter::~Interpreter): Garbage collect here, since
        destroying the interpreter frees the global object and 
        therefore creates a lot of garbage.

2392 2393 2394 2395 2396 2397 2398 2399 2400 2401