- 18 Mar, 2007 8 commits
-
-
mjs authored
Reviewed by Mark. - avoid static construction (and global variable access) in a smarter, more portable way, to later enable MUTLI_THREAD mode to work on other platforms and compilers. * kjs/CommonIdentifiers.cpp: Added. New class to hold all the shared identifiers. (KJS::CommonIdentifiers::CommonIdentifiers): (KJS::CommonIdentifiers::shared): * kjs/CommonIdentifiers.h: Added. * kjs/ExecState.h: (KJS::ExecState::propertyNames): Hand the CommonIdentifiers instance here for easy access. (KJS::ExecState::ExecState): * API/JSObjectRef.cpp: (JSObjectMakeConstructor): * CMakeLists.txt: * JavaScriptCore.exp: * JavaScriptCore.pri: * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: * JavaScriptCore.xcodeproj/project.pbxproj: * JavaScriptCoreSources.bkl: * bindings/runtime_array.cpp: (RuntimeArray::getOwnPropertySlot): (RuntimeArray::put): * bindings/runtime_method.cpp: (RuntimeMethod::getOwnPropertySlot): * kjs/array_object.cpp: (ArrayInstance::getOwnPropertySlot): (ArrayInstance::put): (ArrayInstance::deleteProperty): (ArrayProtoFunc::ArrayProtoFunc): (ArrayProtoFunc::callAsFunction): (ArrayObjectImp::ArrayObjectImp): * kjs/bool_object.cpp: (BooleanPrototype::BooleanPrototype): (BooleanProtoFunc::BooleanProtoFunc): (BooleanProtoFunc::callAsFunction): (BooleanObjectImp::BooleanObjectImp): * kjs/completion.h: (KJS::Completion::Completion): * kjs/date_object.cpp: (KJS::DateProtoFunc::DateProtoFunc): (KJS::DateObjectImp::DateObjectImp): (KJS::DateObjectFuncImp::DateObjectFuncImp): * kjs/error_object.cpp: (ErrorPrototype::ErrorPrototype): (ErrorProtoFunc::ErrorProtoFunc): (ErrorProtoFunc::callAsFunction): (ErrorObjectImp::ErrorObjectImp): (ErrorObjectImp::construct): (NativeErrorPrototype::NativeErrorPrototype): (NativeErrorImp::NativeErrorImp): (NativeErrorImp::construct): (NativeErrorImp::callAsFunction): * kjs/function.cpp: (KJS::FunctionImp::getOwnPropertySlot): (KJS::FunctionImp::put): (KJS::FunctionImp::deleteProperty): (KJS::FunctionImp::getParameterName): (KJS::DeclaredFunctionImp::construct): (KJS::IndexToNameMap::unMap): (KJS::Arguments::Arguments): (KJS::ActivationImp::getOwnPropertySlot): (KJS::ActivationImp::deleteProperty): (KJS::GlobalFuncImp::GlobalFuncImp): * kjs/function_object.cpp: (FunctionPrototype::FunctionPrototype): (FunctionProtoFunc::FunctionProtoFunc): (FunctionProtoFunc::callAsFunction): (FunctionObjectImp::FunctionObjectImp): (FunctionObjectImp::construct): * kjs/grammar.y: * kjs/identifier.cpp: * kjs/identifier.h: * kjs/interpreter.cpp: (KJS::Interpreter::init): (KJS::Interpreter::initGlobalObject): * kjs/interpreter.h: * kjs/lookup.h: * kjs/math_object.cpp: (MathFuncImp::MathFuncImp): * kjs/nodes.cpp: (ArrayNode::evaluate): (FuncDeclNode::processFuncDecl): (FuncExprNode::evaluate): * kjs/number_object.cpp: (NumberPrototype::NumberPrototype): (NumberProtoFunc::NumberProtoFunc): (NumberObjectImp::NumberObjectImp): * kjs/object.cpp: (KJS::JSObject::put): (KJS::JSObject::defaultValue): (KJS::JSObject::hasInstance): * kjs/object.h: (KJS::JSObject::getOwnPropertySlot): * kjs/object_object.cpp: (ObjectPrototype::ObjectPrototype): (ObjectProtoFunc::ObjectProtoFunc): (ObjectObjectImp::ObjectObjectImp): * kjs/regexp_object.cpp: (RegExpPrototype::RegExpPrototype): (RegExpProtoFunc::RegExpProtoFunc): (RegExpObjectImp::RegExpObjectImp): * kjs/string_object.cpp: (KJS::StringInstance::getOwnPropertySlot): (KJS::StringInstance::put): (KJS::StringInstance::deleteProperty): (KJS::StringPrototype::StringPrototype): (KJS::StringProtoFunc::StringProtoFunc): (KJS::StringProtoFunc::callAsFunction): (KJS::StringObjectImp::StringObjectImp): (KJS::StringObjectFuncImp::StringObjectFuncImp): * kjs/testkjs.cpp: (TestFunctionImp::TestFunctionImp): WebCore: Reviewed by Mark. - avoid static construction (and global variable access) in a smarter, more portable way, to later enable MUTLI_THREAD mode to work on other platforms and compilers. * bindings/js/JSCustomXPathNSResolver.cpp: (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): * bindings/js/JSHTMLInputElementBase.cpp: (WebCore::JSHTMLInputElementBaseFunction::JSHTMLInputElementBaseFunction): * bindings/js/JSHTMLOptionElementConstructor.cpp: (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): * bindings/js/JSXMLHttpRequest.cpp: (KJS::JSXMLHttpRequestConstructorImp::JSXMLHttpRequestConstructorImp): * bindings/js/JSXSLTProcessor.cpp: (KJS::XSLTProcessorConstructorImp::XSLTProcessorConstructorImp): * bindings/js/kjs_dom.cpp: (KJS::DOMNamedNodeMap::getOwnPropertySlot): (KJS::DOMNamedNodesCollection::getOwnPropertySlot): * bindings/js/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent): * bindings/js/kjs_html.cpp: (KJS::HTMLElementFunction::HTMLElementFunction): (KJS::JSHTMLCollection::getOwnPropertySlot): * bindings/js/kjs_window.cpp: (KJS::ScheduledAction::execute): * bindings/objc/WebScriptObject.mm: * bindings/scripts/CodeGeneratorJS.pm: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
andrew authored
Reviewed by Mark Rowe Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) * JavaScriptCore.xcodeproj/project.pbxproj: JavaScriptGlue: Reviewed by Mark Rowe Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) * JavaScriptGlue.xcodeproj/project.pbxproj: WebCore: Reviewed by Mark Rowe Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) * WebCore.xcodeproj/project.pbxproj: WebKit: Reviewed by Mark Rowe Set Xcode editor to use 4 space indentation (http://webkit.org/coding/coding-style.html) * WebKit.xcodeproj/project.pbxproj: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20309 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
bdash authored
Rubber-stamped by Brady. Update references to bugzilla.opendarwin.org with bugs.webkit.org. * bindings/c/c_utility.cpp: (KJS::Bindings::convertUTF8ToUTF16): * kjs/function.cpp: (KJS::FunctionImp::callAsFunction): * kjs/grammar.y: * kjs/keywords.table: * kjs/lexer.cpp: (KJS::Lexer::shift): 2007-03-19 Mark Rowe <mrowe@apple.com> Rubber-stamped by Brady. Update references to bugzilla.opendarwin.org with bugs.webkit.org. * ChangeLog: * WebCore.vcproj/WebCore/build-generated-files.sh: * manual-tests/ATSU-bad-layout.html: * manual-tests/accidental-strict-mode.html: * manual-tests/applet-param-no-name.html: * manual-tests/bidi-parens.html: * manual-tests/bugzilla-3855.html: * manual-tests/bugzilla-4840.html: * manual-tests/bugzilla-6821.html: * manual-tests/containing-block-position-chage.html: * manual-tests/contenteditable-link.html: * manual-tests/css3-cursor-fallback-quirks.html: * manual-tests/css3-cursor-fallback-strict.html: * manual-tests/custom-cursors.html: * manual-tests/dictionary-scrolled-iframe.html: * manual-tests/dom-manipulation-on-resize.html: * manual-tests/drag-image-to-address-bar.html: * manual-tests/empty-link-target.html: * manual-tests/empty-title-popup.html: * manual-tests/first-line-style-crash.html: * manual-tests/invalid-mouse-event.html: * manual-tests/left-overflow-repaint.html: * manual-tests/linkjump-3.html: * manual-tests/log-keypress-events.html: * manual-tests/named-window-blank-target.html: * manual-tests/plain-text-paste.html: * manual-tests/plugin-controller-datasource.html: * manual-tests/pre-tab-selection-rect.html: * manual-tests/redirection-target.html: * manual-tests/redraw-page-cache-visited-links.html: * manual-tests/reset-initiatedDrag.html: * manual-tests/resources/named-window-blank-target-step2.html: * manual-tests/resources/named-window-blank-target-step3.html: * manual-tests/resources/named-window-blank-target-step4.html: * manual-tests/resources/redraw-page-cache-visited-links-2.html: * manual-tests/scrollbar-hittest.html: * manual-tests/scrollbar-hittest2.html: * manual-tests/subview-click-assertion.html: * manual-tests/tabbing-input-google.html: * manual-tests/text-field-autoscroll.html: * manual-tests/textarea-after-stylesheet-link.html: * manual-tests/textarea-focus.html: * manual-tests/whitespace-pre-affinity.html: 2007-03-19 Mark Rowe <mrowe@apple.com> Rubber-stamped by Brady. Update references to bugzilla.opendarwin.org with bugs.webkit.org. * WebInspector/webInspector/inspector.css: * WebView/WebHTMLView.mm: (-[WebHTMLView firstRectForCharacterRange:]): * WebView/WebView.mm: (-[WebView initWithFrame:frameName:groupName:]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
Reviewed by Oliver Hunt. Exposed some extra toUInt32 functionality, as part of the fix for REGRESSION: Incomplete document.all implementation breaks abtelectronics.com (Style Change Through JavaScript Blanks Content) * JavaScriptCore.exp: * kjs/identifier.h: (KJS::Identifier::toUInt32): LayoutTests: Reviewed by Oliver Hunt. Layout test for http://bugs.webkit.org/show_bug.cgi?id=13106 REGRESSION: Incomplete document.all implementation breaks abtelectronics.com (Style Change Through JavaScript Blanks Content) * fast/dom/collection-null-like-arguments-expected.txt: Added. * fast/dom/collection-null-like-arguments.html: Added. WebCore: Reviewed by Oliver Hunt. Fixed http://bugs.webkit.org/show_bug.cgi?id=13106 REGRESSION: Incomplete document.all implementation breaks abtelectronics.com (Style Change Through JavaScript Blanks Content) When indexing into collections, treat the empty string as an invalid argument, instead of the number 0. * bindings/js/kjs_html.cpp: (KJS::JSHTMLCollection::getOwnPropertySlot): (KJS::JSHTMLCollection::callAsFunction): (KJS::JSHTMLCollectionPrototypeFunction::callAsFunction): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20295 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
* JavaScriptCore.exp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20293 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
Fixed <rdar://problem/5064964> Repro ASSERT failure in JS Bindings when closing window @ lowtrades.bptrade.com Unfortunately, the bindings depend on UString and Identifier as string representations. So, they need to acquire the JSLock when doing something that will ref/deref their strings. Layout tests, the original site, and Java, Flash, and Quicktime on the web work. No leaks reported. No automated test for this because testing the Java bindings, like math, is hard. * bindings/runtime.h: Made Noncopyable, just to be sure. * bindings/c/c_class.cpp: (KJS::Bindings::CClass::~CClass): Acquire the JSLock and explicitly clear the keys in our hashtable, since they're UString::Reps, and ref/deref aren't thread-safe. (KJS::Bindings::CClass::methodsNamed): Also acquire the JSLock when adding keys to the table, since the table ref's them. (KJS::Bindings::CClass::fieldNamed): ditto. * bindings/c/c_utility.cpp: Removed dead function. (KJS::Bindings::convertValueToNPVariant): Acquire the JSLock because doing it recursively is pretty cheap, and it's just too confusing to tell whether all our callers do it for us. (KJS::Bindings::convertNPVariantToValue): ditto * bindings/c/c_utility.h: * bindings/jni/jni_class.cpp: Same deal as c_class.cpp. (JavaClass::JavaClass): (JavaClass::~JavaClass): * bindings/jni/jni_instance.cpp: Same deal as c_utility.cpp. (JavaInstance::stringValue): * bindings/jni/jni_jsobject.cpp: (JavaJSObject::convertValueToJObject): * bindings/jni/jni_runtime.cpp: (JavaMethod::~JavaMethod): Moved from header, for clarity. (appendClassName): Made this static, so the set of callers is known, and we can assert that we hold the JSLock. Also changed it to take a UString reference, which makes the calling code simpler. (JavaMethod::signature): Store the ASCII value we care about instead of a UString, since UString is so much more hassle. Hold the JSLock while building up the temporary UString. * bindings/jni/jni_runtime.h: Nixed dead code in JavaMethod. (KJS::Bindings::JavaString::JavaString): Hold a UString::Rep instead of a UString, so we can acquire the JSLock and explicitly release it. (KJS::Bindings::JavaString::_commonInit): (KJS::Bindings::JavaString::~JavaString): (KJS::Bindings::JavaString::UTF8String): (KJS::Bindings::JavaString::uchars): (KJS::Bindings::JavaString::length): (KJS::Bindings::JavaString::ustring): * bindings/jni/jni_utility.cpp: (KJS::Bindings::convertArrayInstanceToJavaArray): Made this static, so the set of callers is known, and we can assert that we hold the JSLock. (KJS::Bindings::convertValueToJValue): Acquire the JSLock because doing it recursively is pretty cheap, and it's just too confusing to tell whether all our callers do it for us. * bindings/objc/objc_runtime.h: Nixed some dead code. * bindings/objc/objc_utility.mm: (KJS::Bindings::convertNSStringToString): Same drill as above. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20292 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ap authored
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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
sfalken authored
Build fix. * JavaScriptCore.vcproj/testkjs/testkjs.vcproj: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20290 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 17 Mar, 2007 1 commit
-
-
thatcher authored
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: JavaScriptGlue: 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/JavaScriptGlue.xcconfig: * Configurations/Version.xcconfig: WebCore: 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/Version.xcconfig: * Configurations/WebCore.xcconfig: WebKit: 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/Version.xcconfig: * Configurations/WebKit.xcconfig: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20261 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 16 Mar, 2007 1 commit
-
-
thatcher authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 15 Mar, 2007 7 commits
-
-
mjs authored
- build fix * wtf/TCSystemAlloc.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20230 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mjs authored
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): WebCore: Reviewed by Geoff and Steve. * config.h: Remove unneeded hack. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
thatcher authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
thatcher authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
thatcher authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
thatcher authored
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: JavaScriptGlue: 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/JavaScriptGlue.xcconfig: Added. * Configurations/Version.xcconfig: Added. * Info.plist: * JavaScriptGlue.xcodeproj/project.pbxproj: WebCore: 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/Version.xcconfig: Added. * Configurations/WebCore.xcconfig: Added. * Info.plist: * WebCore.xcodeproj/project.pbxproj: WebKit: Reviewed by John. * Fixes: <rdar://problem/4927747> WebKit's Current Library Version number should match the Info.plist Version * 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). * Make WebKit use the same warning flags as the other projects. This required two casts to be added to fix new warnings. * Configurations/Base.xcconfig: Added. * Configurations/DebugRelease.xcconfig: Added. * Configurations/Version.xcconfig: Added. * Configurations/WebKit.xcconfig: Added. * Info.plist: * Misc/WebKitVersionChecks.h: * Plugins/WebBaseNetscapePluginStream.m: (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:]): * WebKit.xcodeproj/project.pbxproj: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
bdash authored
Gdk build fix. * kjs/DateMath.cpp: gettimeofday comes from <sys/time.h> on Linux. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 14 Mar, 2007 3 commits
-
-
kmccullo authored
- Fixed one more build breakage * kjs/date_object.cpp: (KJS::formatLocaleDate): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
kmccullo authored
- Fixed a build breakage. * kjs/DateMath.cpp: * kjs/date_object.cpp: (KJS::formatLocaleDate): (KJS::DateObjectImp::construct): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
kmccullo authored
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. LayoutTests: Reviewed by Geoff. - rdar://problem/5045720 - DST changes in US affect JavaScript date calculations (12975) Changed layout tests to properly check for the new changes to DST in the US. Also these now test that equivalent years return the same results for DST. * fast/js/date-DST-time-cusps-expected.txt: * fast/js/date-big-setdate-expected.txt: * fast/js/resources/date-DST-time-cusps.js: * fast/js/resources/date-big-setdate.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 13 Mar, 2007 1 commit
-
-
kmccullo authored
- Adding expected failures until the are truly fixed. - rdar://problem/5060302 * tests/mozilla/expected.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20157 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 12 Mar, 2007 3 commits
-
-
kmccullo authored
- 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: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
kmccullo authored
- Update tests for new DST rules. * tests/mozilla/ecma/shell.js: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20118 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
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. JavaScriptGlue: Reviewed by Oliver Hunt. Updated in light of fix for <rdar://problem/4681051> Installer crashes in KJS::Collector::markOtherThreadConservatively(KJS::Collector::Thread*) trying to install iLife 06 using Rosetta on an Intel Machine * JavaScriptGlue.cpp: (JSLockInterpreter): Ensure backwards compatibility by calling registerThread() when explicitly taking the JSLock. (This doesn't happen automatically anymore.) I doubt this actally matters, but in JavaScriptGlue territory, that kind of thinking will get you killed. WebKitTools: Reviewed by Oliver Hunt. Beefed up --threaded mode in light of <rdar://problem/4681051> Installer crashes in KJS::Collector::markOtherThreadConservatively(KJS::Collector::Thread*) trying to install iLife 06 using Rosetta on an Intel Machine --threaded mode now runs a bunch of different JavaScript threads, randomly killing and respawning them. This was sufficient for reproducing the bug on my MacBook Pro. * DumpRenderTree/DumpRenderTree.m: (javaScriptThreads): (runJavaScriptThread): (startJavaScriptThreads): (stopJavaScriptThreads): (dumpRenderTree): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20115 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 11 Mar, 2007 1 commit
-
-
ggaren authored
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. WebCore: Reviewed by Darin Adler. Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and JSCore causes a hang @ www.panoramas.dk See JavaScriptCore ChangeLog for details. * bindings/objc/WebScriptObject.mm: (_didExecute): Added helpful ASSERT. (+[WebScriptObject throwException:]): Added missing JSLock. WebKit: Reviewed by Darin Adler. Fixed <rdar://problem/4587763> PAC file: lock inversion between QT and JSCore causes a hang @ www.panoramas.dk See JavaScriptCore ChangeLog for details. Drop the JSLock before making calls through the plug-in API from functions that may have been called by JavaScript. * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView sendEvent:]): (-[WebBaseNetscapePluginView setWindowIfNecessary]): (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]): (-[WebBaseNetscapePluginView createPluginScriptableObject]): (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]): (-[WebBaseNetscapePluginView loadPluginRequest:]): (-[WebBaseNetscapePluginView _printedPluginBitmap]): * Plugins/WebPluginController.mm: (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]): (-[WebPluginController startAllPlugins]): (-[WebPluginController stopAllPlugins]): (-[WebPluginController addPlugin:]): (-[WebPluginController destroyPlugin:]): (-[WebPluginController destroyAllPlugins]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20104 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 08 Mar, 2007 1 commit
-
-
bdash authored
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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 07 Mar, 2007 5 commits
-
-
bdash authored
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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20043 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
Use a shared global in the non-multiple-thread case. * wtf/FastMalloc.cpp: (WTF::isForbidden): (WTF::fastMallocForbid): (WTF::fastMallocAllow): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
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): WebCore: 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) No test because this is very difficult to repro, and the new ASSERTs in JavaScriptCore catch the underlying cause while running normal layout tests. This is a modified version of r14752 on the branch. The fix is to use a bit inside each node, instead of a hash table, to track which node subtrees are in the process of being marked. This avoids a call to malloc inside mark(). * bindings/js/kjs_binding.cpp: (KJS::domObjects): (KJS::domNodesPerDocument): * bindings/js/kjs_dom.cpp: (KJS::DOMNode::mark): * dom/Node.cpp: (WebCore::Node::Node): * dom/Node.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20019 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
bdash authored
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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20015 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 06 Mar, 2007 2 commits
-
-
ggaren authored
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): JavaScriptGlue: Reviewed by Maciej Stachowiak. Fixed all known crashers exposed by run-webkit-tests --threaded while using a PAC file (for maximum carnage). See JavaScriptCore ChangeLog for more details. * JSBase.cpp: (JSBase::Release): Lock when deleting, because we may be deleting an object (like a JSRun) that holds thread-unsafe data. * JSUtils.cpp: (CFStringToUString): Don't lock, because our caller locks. Also, locking inside a function that returns thread-unsafe data by copy will only mask threading problems. * JavaScriptGlue.cpp: (JSRunEvaluate): Added missing JSLock. (JSRunCheckSyntax): Converted to JSLock. * JavaScriptGlue.xcodeproj/project.pbxproj: WebCore: Reviewed by Maciej Stachowiak. Fixed all known crashers exposed by run-webkit-tests --threaded [*]. See JavaScriptCore ChangeLog for more details. * bindings/js/kjs_binding.cpp: (KJS::domNodesPerDocument): Added thread safety ASSERT. (KJS::ScriptInterpreter::mark): Removed obsolete logic for marking unsafe objects when collecting on a secondary thread. The Collector takes care of this now. * bindings/js/kjs_binding.h: (KJS::DOMObject::DOMObject): Used new API for specifying that WebCore objects should be garbage collected on the main thread only. * bindings/js/kjs_window.cpp: (KJS::ScheduledAction::execute): Moved JSLock to cover implementedsCall() call, which, for some subclasses, ends up allocating garbage collected objects. (This fix was speculative. I didn't actually see a crash from this.) (KJS::Window::timerFired): Added JSLock around ScheduleAction destruction, since it destroys a KJS::List. * bindings/objc/WebScriptObject.mm: (-[WebScriptObject setException:]): Added JSLock. (This fix was speculative. I didn't actually see a crash from this.) * bridge/mac/WebCoreScriptDebugger.mm: (-[WebCoreScriptCallFrame evaluateWebScript:]): Added JSLock. (This fix was speculative. I didn't actually see a crash from this.) * dom/Document.cpp: (WebCore::Document::~Document): Added JSLock around modification to domNodesPerDocument(), which can be accessed concurrently during garbage collection. * dom/Node.cpp: (WebCore::Node::setDocument): ditto. [*] fast/js/toString-stack-overflow.html is an exception. --threaded mode crashes this test because it causes the garbage collector to run frequently, and this test crashes if you happen to garbage collect while it's running. This is a known issue with stack overflow during the mark phase. It's not related to threading. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@20004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19994 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 04 Mar, 2007 1 commit
-
-
ddkilzer authored
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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19956 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 02 Mar, 2007 3 commits
-
-
sfalken authored
Reviewed by Anders. Add unsigned int hash traits (matches existing unsigned long version) * wtf/HashTraits.h: (WTF::): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19947 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
aroben authored
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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19945 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin authored
- 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. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 27 Feb, 2007 2 commits
-
-
ggaren authored
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: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren authored
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): LayoutTests: Reviewed by Maciej Stachowiak. Test for http://bugs.webkit.org/show_bug.cgi?id=12659 | <rdar://problem/4954306> JS objects not collected after closing window @ ebay.com/maps.google.com * fast/leaks/003-expected.txt: Added. * fast/leaks/003.html: Added. * fast/dom/gc-10.html: Bumped the wiggle room threshold on this test by 2 because it's failing on my machine with the patch applied but, according to the test notes, we're still well within the margin of error. WebCore: 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 Garbage collect in the KJSProxy destructor, after clearing our reference to the interpreter, because that's when the interpreter has torn down fully. (Technically speaking, we can't *prove* that we have the only reference to our interpreter, but that's how it works in practice, and manual garbage collection is just an opportunistic optimization, so it's OK for it to work in practice even if it can't be proven in theory.) Layout tests pass. No leaks reported. * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::~KJSProxy): * bindings/js/kjs_proxy.h: * page/Page.cpp: (WebCore::Page::~Page): Merged pageDestroyed() calls. Moved debug-only code to the bottom. * page/Frame.cpp: (WebCore::Frame::~Frame): Don't call getObject() because globalObject() returns a JSObject* already, and the call can leave a pointer to the Window object on the stack. Don't check for NULL because it is an invariant of JavaScriptCore that no JSObject* can be NULL. Do use a volatile pointer for w because the 'w = 0' assignment just screams to the compiler, "Don't generate any code for me!" git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19894 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 26 Feb, 2007 1 commit
-
-
kjk authored
Reviewed by Adam Roben. Rename *_SUPPORT defines to ENABLE_*. * jscore.bkl: WebKitTools: Reviewed by Adam Roben. Rename *_SUPPORT defines to ENABLE_*. * GdkLauncher/gdklauncher.bkl: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-