- 23 Feb, 2008 1 commit
-
-
ap@webkit.org authored
Reviewed by Darin. Move basic threading support from WebCore to WTF. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 22 Feb, 2008 2 commits
-
-
ggaren@apple.com authored
Reviewed by Sam Weinig. Partial fix for <rdar://problem/5744037> Gmail out of memory (17455) I'm removing KJS_MEM_LIMIT for the following reasons: - We have a few reports of KJS_MEM_LIMIT breaking important web applications, like GMail and Google Reader. (For example, if you simply open 12 GMail tabs, tab #12 will hit the limit.) - Firefox has no discernable JS object count limit, so any limit, even a large one, is a potential compatibility problem. - KJS_MEM_LIMIT does not protect against malicious memory allocation, since there are many ways to maliciously allocate memory without increasing the JS object count. - KJS_MEM_LIMIT is already mostly broken, since it only aborts the script that breaches the limit, not any subsequent scripts. - We've never gotten bug reports about websites that would have benefited from an unbroken KJS_MEM_LIMIT. The initial check-in of KJS_MEM_LIMIT (KJS revision 80061) doesn't mention a website that needed it. - Any website that brings you anywhere close to crashing due to the number of live JS objects will almost certainly put up the "slow script" dialog at least 20 times beforehand. * kjs/collector.cpp: (KJS::Collector::collect): * kjs/collector.h: * kjs/nodes.cpp: (KJS::TryNode::execute): LayoutTests: Reviewed by Sam Weinig. Removing the test for KJS_MEM_LIMIT, since I removed KJS_MEM_LIMIT. * fast/js/out-of-memory-expected.txt: Removed. * fast/js/out-of-memory.html: Removed. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
rdar://problem/5759327oliver@apple.com authored
Reviewed by Alexey P. Fix yet another case where we incorrectly relied on implicit double to bool coercion. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 20 Feb, 2008 1 commit
-
-
weinig@apple.com authored
Reviewed by Darin. Fix for Bug 16753: date set methods with no args should result in NaN (Acid3 bug) The set values result in NaN now when called with no args, NaN or +/- inf values. The setYear, setFullYear and setUTCFullYear methods used on NaN dates work as descripted in the standard. * kjs/date_object.cpp: (KJS::fillStructuresUsingTimeArgs): (KJS::fillStructuresUsingDateArgs): (KJS::setNewValueFromTimeArgs): (KJS::setNewValueFromDateArgs): (KJS::dateProtoFuncSetYear): LayoutTests: Reviewed by Darin. - test for Bug 16753: date set methods with no args should result in NaN (Acid3 bug) * fast/js/date-set-to-nan-expected.txt: Added. * fast/js/date-set-to-nan.html: Added. * fast/js/resources/date-set-to-nan.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 19 Feb, 2008 3 commits
-
-
andersca@apple.com authored
Change OpaqueJSClass and RootObject to start with a ref count of 1. * API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): (OpaqueJSClass::createNoAutomaticPrototype): (OpaqueJSClass::create): * API/JSClassRef.h: * API/JSObjectRef.cpp: (JSClassCreate): * bindings/runtime_root.cpp: (KJS::Bindings::RootObject::create): (KJS::Bindings::RootObject::RootObject): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Rubber stamped by Anders. - removed explicit initialization to 1 for RefCounted; that's now the default * kjs/regexp.cpp: (KJS::RegExp::RegExp): Removed RefCounted initializer. WebCore: Rubber stamped by Anders. - removed explicit initialization to 1 for RefCounted; that's now the default * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::ResourceLoader): Removed RefCounted initializer. * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): Ditto. * platform/text/StringImpl.cpp: (WebCore::StringImpl::StringImpl): Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
- next step for http://bugs.webkit.org/show_bug.cgi?id=17257 start ref counts at 1 instead of 0 for speed * wtf/RefCounted.h: (WTF::RefCounted::RefCounted): Have refcounts default to 1. This allows us to start removing the explicit initialization of RefCounted from classes and eventually we can remove the ability to have the initial count of 0 entirely. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 18 Feb, 2008 2 commits
-
-
weinig@apple.com authored
Reviewed by Geoff Garen. Fix for http://bugs.webkit.org/show_bug.cgi?id=17419 Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode * kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::init): * kjs/JSGlobalObject.h: (KJS::JSGlobalObject::setDebugger): * kjs/date_object.cpp: (KJS::dateProtoFuncGetYear): WebCore: Reviewed by Geoff Garen. Fix for http://bugs.webkit.org/show_bug.cgi?id=17419 Remove CompatMode from JavaScriptCore as it is never set to anything other than NativeMode * bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::initScript): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30387 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
* wtf/ASCIICType.h: (WTF::toASCIIHexValue): Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30380 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 17 Feb, 2008 1 commit
-
-
darin@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30356 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 15 Feb, 2008 1 commit
-
-
aroben@apple.com authored
JavaScriptCore: Make JavaScriptCore's FEATURE_DEFINES match WebCore's Reviewed by Mark. * Configurations/JavaScriptCore.xcconfig: WebKit/mac: Make WebKit's FEATURE_DEFINES match WebCore's Reviewed by Mark. * Configurations/WebKit.xcconfig: WebKitTools: Fix a typo that broke the Mac build Reviewed by Mark. * Scripts/build-webkit: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 14 Feb, 2008 2 commits
-
-
slewis@apple.com authored
Reviewed by Geoff. Update order files. * WebKit.order: * WebCore.order: * JavaScriptCore.order: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren@apple.com authored
Reviewed by Sam Weinig. Fixed <rdar://problem/5737835> nee http://bugs.webkit.org/show_bug.cgi?id=17329 Crash in JSGlobalObject::popActivation when inserting hyperlink in Wordpress (17329) Don't reset the "activations" stack in JSGlobalObject::reset, since we might be executing a script during the call to reset, and the script needs to safely run to completion. Instead, initialize the "activations" stack when the global object is created, and subsequently rely on pushing and popping during normal execution to maintain the stack's state. * kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::init): (KJS::JSGlobalObject::reset): LayoutTests: Reviewed by Sam Weinig. Layout test for <rdar://problem/5737835> nee http://bugs.webkit.org/show_bug.cgi?id=17329 Crash in JSGlobalObject::popActivation when inserting hyperlink in Wordpress (17329) * fast/dom/javascript-url-crash-function.html: Added. * fast/dom/javascript-url-crash-function-expected.txt: Added. * fast/dom/resources/javascript-url-crash-function-iframe.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 13 Feb, 2008 3 commits
-
-
mrowe@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
- http://bugs.webkit.org/show_bug.cgi?id=17339 JavaScriptCore does not build with gcc 4.3 * kjs/interpreter.cpp: Add include of <unistd.h>, since that's where getpid() comes from. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
rdar://problem/5737003oliver@apple.com authored
Reviewed by Alexey P. When converting numeric values to booleans we need to account for NaN git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 12 Feb, 2008 1 commit
-
-
weinig@apple.com authored
<rdar://problem/5659216> REGRESSION: PLT 0.3% slower due to r28868 (caching ClassNodeList and NamedNodeList) - Tweak the statements in isASCIISpace to account for the statistical distribution of usage in the PLT. .4% speedup on my machine. Stephanie's machine shows this as .3% speedup. * wtf/ASCIICType.h: (WTF::isASCIISpace): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 11 Feb, 2008 2 commits
-
-
weinig@apple.com authored
Fixes for: <rdar://problem/5735497> Match Firefox's cross-domain model more accurately by return the built-in version of functions even if they have been overridden <rdar://problem/5735443> Crash when setting the Window objects prototype to a custom Object and then calling a method on it - Expose the native Object.prototype.toString implementation so that it can be used for cross-domain toString calling. * JavaScriptCore.exp: * kjs/object_object.cpp: * kjs/object_object.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30158 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
* kjs/ExecState.h: (KJS::ExecState::takeException): Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 10 Feb, 2008 2 commits
-
-
darin@apple.com authored
Reviewed by Eric. - http://bugs.webkit.org/show_bug.cgi?id=17256 eliminate default ref. count of 0 in RefCounted class * wtf/RefCounted.h: (WTF::RefCounted::RefCounted): Remove default of 0. WebKit/wx: Reviewed by Eric. - http://bugs.webkit.org/show_bug.cgi?id=17256 eliminate default ref. count of 0 in RefCounted class * WebKitSupport/FrameLoaderClientWx.cpp: (WebCore::FrameLoaderClientWx::FrameLoaderClientWx): Set the count to 0 explicitly (one stray client I missed in my last pass). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Reviewed by Eric. - http://bugs.webkit.org/show_bug.cgi?id=17256 Make clients of RefCounted explicitly set the count to 0. * API/JSClassRef.cpp: (OpaqueJSClass::OpaqueJSClass): * bindings/runtime_root.cpp: (KJS::Bindings::RootObject::RootObject): WebCore: Reviewed by Eric. - http://bugs.webkit.org/show_bug.cgi?id=17256 Make clients of RefCounted explicitly set the count to 0. * bindings/js/JSSVGPODTypeWrapper.h: (WebCore::JSSVGPODTypeWrapper::JSSVGPODTypeWrapper): * css/CSSFontFace.h: (WebCore::CSSFontFace::CSSFontFace): * css/CSSRuleList.cpp: (WebCore::CSSRuleList::CSSRuleList): * css/CSSSegmentedFontFace.cpp: (WebCore::CSSSegmentedFontFace::CSSSegmentedFontFace): * css/Counter.h: (WebCore::Counter::Counter): * css/Pair.h: (WebCore::Pair::Pair): * css/Rect.h: (WebCore::Rect::Rect): * css/StyleBase.h: (WebCore::StyleBase::StyleBase): * css/StyleSheetList.cpp: (WebCore::StyleSheetList::StyleSheetList): * dom/Attr.cpp: (WebCore::Attr::Attr): * dom/Attr.h: * dom/Attribute.h: (WebCore::Attribute::Attribute): * dom/Clipboard.cpp: (WebCore::Clipboard::Clipboard): * dom/DOMImplementation.h: (WebCore::DOMImplementation::DOMImplementation): * dom/Event.cpp: (WebCore::Event::Event): * dom/EventListener.h: (WebCore::EventListener::EventListener): * dom/ExceptionBase.cpp: (WebCore::ExceptionBase::ExceptionBase): * dom/NamedAttrMap.h: (WebCore::NamedAttrMap::insertAttribute): * dom/NamedNodeMap.h: (WebCore::NamedNodeMap::NamedNodeMap): * dom/NodeFilter.h: (WebCore::NodeFilter::NodeFilter): * dom/NodeFilterCondition.h: (WebCore::NodeFilterCondition::NodeFilterCondition): * dom/NodeList.h: (WebCore::NodeList::NodeList): * dom/QualifiedName.h: (WebCore::QualifiedName::QualifiedNameImpl::QualifiedNameImpl): (WebCore::QualifiedName::ref): * dom/Range.cpp: (WebCore::Range::Range): * dom/RegisteredEventListener.cpp: (WebCore::RegisteredEventListener::RegisteredEventListener): * dom/StyledElement.h: * dom/Traversal.cpp: (WebCore::Traversal::Traversal): * editing/EditCommand.cpp: (WebCore::EditCommand::EditCommand): * history/BackForwardList.cpp: (WebCore::BackForwardList::BackForwardList): * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): * history/HistoryItem.cpp: (WebCore::HistoryItem::HistoryItem): * html/CanvasGradient.cpp: (WebCore::CanvasGradient::CanvasGradient): * html/CanvasPattern.cpp: (WebCore::CanvasPattern::CanvasPattern): * html/CanvasRenderingContext2D.cpp: (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): * html/CanvasStyle.cpp: (WebCore::CanvasStyle::CanvasStyle): * html/HTMLCollection.cpp: (WebCore::HTMLCollection::HTMLCollection): * html/MediaError.h: (WebCore::MediaError::MediaError): * html/TimeRanges.cpp: (TimeRanges::TimeRanges): * html/TimeRanges.h: (WebCore::TimeRanges::TimeRanges): * html/VoidCallback.h: (WebCore::VoidCallback::VoidCallback): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::DocumentLoader): * loader/FormState.cpp: (WebCore::FormState::FormState): * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::ResourceLoader): * loader/TextResourceDecoder.cpp: (WebCore::TextResourceDecoder::TextResourceDecoder): * loader/icon/IconRecord.cpp: (WebCore::IconRecord::IconRecord): * page/BarInfo.cpp: (WebCore::BarInfo::BarInfo): * page/Console.cpp: (WebCore::Console::Console): * page/DOMSelection.cpp: (WebCore::DOMSelection::DOMSelection): * page/DOMWindow.cpp: (WebCore::DOMWindow::DOMWindow): * page/Frame.cpp: (WebCore::Frame::Frame): * page/History.cpp: (WebCore::History::History): * page/InspectorController.cpp: (WebCore::InspectorResource::InspectorResource): (WebCore::InspectorDatabaseResource::InspectorDatabaseResource): * page/Plugin.h: (WebCore::Plugin::Plugin): * page/Screen.cpp: (WebCore::Screen::Screen): * platform/ArrayImpl.cpp: (WebCore::ArrayImpl::ArrayPrivate::ArrayPrivate): * platform/DeprecatedValueListImpl.cpp: (WebCore::DeprecatedValueListImpl::Private::Private): * platform/ScrollBar.cpp: (WebCore::Scrollbar::Scrollbar): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): * platform/graphics/FontFallbackList.cpp: (WebCore::FontFallbackList::FontFallbackList): * platform/graphics/FontFamily.cpp: (WebCore::FontFamily::FontFamily): * platform/graphics/FontFamily.h: (WebCore::FontFamily::FontFamily): * platform/graphics/FontSelector.h: (WebCore::FontSelector::FontSelector): (WebCore::FontSelector::~FontSelector): * platform/graphics/GlyphPageTreeNode.h: (WebCore::GlyphPage::GlyphPage): * platform/graphics/mac/IconMac.mm: (WebCore::Icon::Icon): * platform/mac/FileChooserMac.mm: (WebCore::FileChooser::FileChooser): * platform/mac/PopupMenuMac.mm: (WebCore::PopupMenu::PopupMenu): * platform/mac/SharedBufferMac.mm: (WebCore::SharedBuffer::SharedBuffer): * platform/network/FormData.cpp: (WebCore::FormData::FormData): * platform/network/FormData.h: (WebCore::FormData::FormData): * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::ResourceHandle): * platform/text/CString.h: (WebCore::CStringBuffer::CStringBuffer): * platform/text/RegularExpression.cpp: (WebCore::RegularExpression::Private::Private): * rendering/RenderStyle.cpp: (WebCore::StyleSurroundData::StyleSurroundData): (WebCore::StyleBoxData::StyleBoxData): (WebCore::StyleVisualData::StyleVisualData): (WebCore::StyleBackgroundData::StyleBackgroundData): (WebCore::StyleMarqueeData::StyleMarqueeData): (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData): (WebCore::StyleMultiColData::StyleMultiColData): (WebCore::StyleTransformData::StyleTransformData): (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): (WebCore::StyleRareInheritedData::StyleRareInheritedData): (WebCore::StyleInheritedData::StyleInheritedData): * rendering/RenderStyle.h: (WebCore::TransformOperation::TransformOperation): (WebCore::CursorList::CursorList): * rendering/SVGCharacterLayoutInfo.h: (WebCore::SVGCharOnPath::SVGCharOnPath): * rendering/SVGRenderStyle.cpp: (WebCore::SVGRenderStyle::SVGRenderStyle): * rendering/SVGRenderStyle.h: (WebCore::SVGRenderStyle::SVGRenderStyle): * rendering/SVGRenderStyleDefs.cpp: (StyleFillData::StyleFillData): (StyleStrokeData::StyleStrokeData): (StyleStopData::StyleStopData): (StyleTextData::StyleTextData): (StyleClipData::StyleClipData): (StyleMaskData::StyleMaskData): (StyleMarkerData::StyleMarkerData): (StyleMiscData::StyleMiscData): * storage/SQLResultSetRowList.h: (WebCore::SQLResultSetRowList::SQLResultSetRowList): * svg/SVGAngle.cpp: (WebCore::SVGAngle::SVGAngle): * svg/SVGAnimatedTemplate.h: (WebCore::SVGAnimatedTemplate::SVGAnimatedTemplate): * svg/SVGElementInstanceList.cpp: (WebCore::SVGElementInstanceList::SVGElementInstanceList): * svg/SVGList.h: (WebCore::SVGList::SVGList): (WebCore::SVGPODListItem::SVGPODListItem): * svg/SVGPathSeg.h: (WebCore::SVGPathSeg::SVGPathSeg): * svg/SVGPreserveAspectRatio.cpp: (WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio): * svg/SVGRenderingIntent.h: (WebCore::SVGRenderingIntent::SVGRenderingIntent): * svg/SVGUnitTypes.h: (WebCore::SVGUnitTypes::SVGUnitTypes): * svg/graphics/SVGPaintServerGradient.h: (WebCore::SVGPaintServerGradient::SharedStopCache::SharedStopCache): * svg/graphics/SVGResource.cpp: (WebCore::SVGResource::SVGResource): * xml/DOMParser.h: (WebCore::DOMParser::DOMParser): * xml/XMLHttpRequest.cpp: (WebCore::XMLHttpRequest::XMLHttpRequest): * xml/XMLSerializer.h: (WebCore::XMLSerializer::XMLSerializer): * xml/XPathEvaluator.h: (WebCore::XPathEvaluator::XPathEvaluator): * xml/XPathExpression.h: (WebCore::XPathExpression::XPathExpression): * xml/XPathNSResolver.h: (WebCore::XPathNSResolver::XPathNSResolver): * xml/XPathResult.cpp: (WebCore::XPathResult::XPathResult): * xml/XPathValue.h: (WebCore::XPath::ValueData::ValueData): * xml/XSLTProcessor.h: (WebCore::XSLTProcessor::XSLTProcessor): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 09 Feb, 2008 1 commit
-
-
darin@apple.com authored
- http://bugs.webkit.org/show_bug.cgi?id=17256 Change RegExp to start its ref count at 1, not 0 We'll want to do this to every RefCounted class, one at a time. * kjs/nodes.h: (KJS::RegExpNode::RegExpNode): Use RegExp::create instead of new RegExp. * kjs/regexp.cpp: (KJS::RegExp::RegExp): Marked inline, set initial ref count to 1. (KJS::RegExp::create): Added. Calls new RegExp then adopts the initial ref. * kjs/regexp.h: Reformatted. Made the constructors private. Added static create functions that return objects already wrapped in PassRefPtr. * kjs/regexp_object.cpp: (KJS::regExpProtoFuncCompile): Use RegExp::create instead of new RegExp. (KJS::RegExpObjectImp::construct): Ditto. * kjs/string_object.cpp: (KJS::stringProtoFuncMatch): Ditto. (KJS::stringProtoFuncSearch): Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30109 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 08 Feb, 2008 3 commits
-
-
rdar://problem/5731773oliver@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=17214 Reviewed by Maciej Make a subclass of CommaNode to provide the correct precedence for each expression in a variable declaration list. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30105 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Reviewed by Oliver. - fix http://bugs.webkit.org/show_bug.cgi?id=17247 Labelled continue/break can fail in some cases Test: fast/js/continue-break-multiple-labels.html * kjs/nodes.h: (KJS::StatementNode::pushLabel): Made this virtual. (KJS::LabelNode::pushLabel): Forward pushLabel calls to the statement inside. LayoutTests: - test for http://bugs.webkit.org/show_bug.cgi?id=17247 Labelled continue/break can fail in some cases * fast/js/continue-break-multiple-labels-expected.txt: Added. * fast/js/continue-break-multiple-labels.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Reviewed by Eric. - fix http://bugs.webkit.org/show_bug.cgi?id=15003 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug) Test: fast/js/constructor-attributes.html * kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::reset): Remove unwanted attributes from "constructor". * kjs/function_object.cpp: (KJS::FunctionObjectImp::construct): Ditto. * kjs/nodes.cpp: (KJS::FuncDeclNode::makeFunction): Ditto. (KJS::FuncExprNode::evaluate): Ditto. WebCore: Reviewed by Eric. - fix http://bugs.webkit.org/show_bug.cgi?id=15003 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug) Test: fast/js/constructor-attributes.html * bindings/scripts/CodeGeneratorJS.pm: Remove unwanted attributes from "constructor". LayoutTests: Reviewed by Eric. - test for http://bugs.webkit.org/show_bug.cgi?id=15003 Function.prototype.constructor should not be DontDelete/ReadOnly (Acid3 bug) * fast/js/constructor-attributes-expected.txt: Added. * fast/js/constructor-attributes.html: Added. * fast/js/resources/constructor-attributes.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 06 Feb, 2008 4 commits
-
-
ggaren@apple.com authored
Added an ASSERT to catch refCount underflow, since it caused a leak in my last check-in. * wtf/RefCounted.h: (WTF::RefCounted::deref): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30051 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
ggaren@apple.com authored
PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4% slower due to r28884 (global variable symbol table optimization) Tweaked RefCounted::deref() to be a little more efficient. 1% - 1.5% speedup on my machine. .7% speedup on Stephanie's machine. * wtf/RefCounted.h: (WTF::RefCounted::deref): Don't modify m_refCount if we're just going to delete the object anyway. Also, use a simple == test, which might be faster than <= on some hardware. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Reviewed by Sam. - fix http://bugs.webkit.org/show_bug.cgi?id=17094 Array.prototype functions create length properties with DontEnum/DontDelete Test results match Gecko with very few obscure exceptions that seem to be bugs in Gecko. Test: fast/js/array-functions-non-arrays.html * kjs/array_object.cpp: (KJS::arrayProtoFuncConcat): Removed DontEnum and DontDelete from the call to set length. (KJS::arrayProtoFuncPop): Ditto. Also added missing call to deleteProperty, which is not needed for real arrays, but is needed for non-arrays. (KJS::arrayProtoFuncPush): Ditto. (KJS::arrayProtoFuncShift): Ditto. (KJS::arrayProtoFuncSlice): Ditto. (KJS::arrayProtoFuncSort): Removed incorrect call to set length when the array has no elements. (KJS::arrayProtoFuncSplice): Removed DontEnum and DontDelete from the call to set length. (KJS::arrayProtoFuncUnShift): Ditto. Also added a check for 0 arguments to make behavior match the specification in that case. * kjs/nodes.cpp: (KJS::ArrayNode::evaluate): Removed DontEnum and DontDelete from the call to set length. LayoutTests: Reviewed by Sam. - tests for http://bugs.webkit.org/show_bug.cgi?id=17094 Array.prototype functions create length attributes with DontEnum/DontDelete * fast/js/array-functions-non-arrays-expected.txt: Added. * fast/js/array-functions-non-arrays.html: Added. * fast/js/resources/array-functions-non-arrays.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30041 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
darin@apple.com authored
Reviewed by Sam. - replace calls to put to set up properties with calls to putDirect, to prepare for a future change where put won't take attributes any more, and for a slight performance boost * API/JSObjectRef.cpp: (JSObjectMakeConstructor): Use putDirect instead of put. * kjs/CommonIdentifiers.h: Removed lastIndex. * kjs/JSGlobalObject.cpp: (KJS::JSGlobalObject::reset): Use putDirect instead of put. * kjs/array_object.cpp: (KJS::arrayProtoFuncConcat): Took out extra call to get length (unused). (KJS::ArrayObjectImp::ArrayObjectImp): Use putDirect instead of put. * kjs/error_object.cpp: (KJS::ErrorPrototype::ErrorPrototype): Use putDirect instead of put. * kjs/function.cpp: (KJS::Arguments::Arguments): Use putDirect instead of put. (KJS::PrototypeFunction::PrototypeFunction): Use putDirect instead of put. * kjs/function_object.cpp: (KJS::FunctionObjectImp::construct): Use putDirect instead of put. * kjs/nodes.cpp: (KJS::FuncDeclNode::makeFunction): Use putDirect instead of put. (KJS::FuncExprNode::evaluate): Use putDirect instead of put. * kjs/regexp_object.cpp: (KJS::regExpProtoFuncCompile): Use setLastIndex instead of put(lastIndex). (KJS::RegExpImp::match): Get and set lastIndex by using m_lastIndex instead of calling get and put. * kjs/regexp_object.h: (KJS::RegExpImp::setLastIndex): Added. * kjs/string_object.cpp: (KJS::stringProtoFuncMatch): Use setLastIndex instead of put(lastIndex). WebCore: Reviewed by Sam. - replace calls to put to set up properties with calls to putDirect, to prepare for a future change where put won't take attributes any more, and for a slight performance boost * bindings/js/JSAudioConstructor.cpp: (WebCore::JSAudioConstructor::JSAudioConstructor): Use putDirect instead of put. * bindings/js/JSEventTargetBase.h: (WebCore::JSEventTargetPrototype::self): Ditto. * bindings/js/JSHTMLOptionElementConstructor.cpp: (WebCore::JSHTMLOptionElementConstructor::JSHTMLOptionElementConstructor): Ditto. * bindings/js/JSSQLResultSetRowListCustom.cpp: (WebCore::JSSQLResultSetRowList::item): Ditto. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 05 Feb, 2008 3 commits
-
-
weinig@apple.com authored
Reviewed by Anders Carlsson. Fix for http://bugs.webkit.org/show_bug.cgi?id=8080 NodeList (and other DOM lists) items are not enumeratable using for..in * JavaScriptCore.exp: WebCore: Reviewed by Anders Carlsson. Fix for http://bugs.webkit.org/show_bug.cgi?id=8080 NodeList (and other DOM lists) items are not enumeratable using for..in - Match Firefox when enumerating DOM interfaces with indexGetters (support for the array bracket, nodeList[0], notation) by including all the items in the list before the attributes and methods of the interface. Test: fast/dom/domListEnumeration.html * ForwardingHeaders/kjs/PropertyNameArray.h: Added. * bindings/js/JSDOMWindowCustom.cpp: (WebCore::JSDOMWindow::customGetPropertyNames): Use the new custom method model. * bindings/js/JSHistoryCustom.cpp: (WebCore::JSHistory::customGetPropertyNames): ditto. * bindings/scripts/CodeGeneratorJS.pm: Instead of just adding a declaration of getProperyNames and implementing the method in the Custom.cpp, move to a the model used by generated getOwnPropertySlot() and put() where the custom code is written in a separate customGetPropertyNames which returns a bool indicating whether to call up to the base class. This enables adding the list indexes to the PropertyNameArray for interfaces with indexGetters automatically. LayoutTests: Reviewed by Anders Carlsson. Test for http://bugs.webkit.org/show_bug.cgi?id=8080 NodeList (and other DOM lists) items are not enumeratable using for..in * fast/dom/domListEnumeration-expected.txt: Added. * fast/dom/domListEnumeration.html: Added. * fast/dom/resources/domListEnumeration.js: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
mrowe@apple.com authored
Reviewed by Oliver Hunt. * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30003 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
oliver@apple.com authored
Bug 17015: REGRESSION (r29414-29428): www.fox.com "shows" menu fails to render Bug 17164: REGRESSION: JavaScript pop-up menu appears at wrong location when hovering image at http://news.chinatimes.com/ Reviewed by Oliver Hunt <http://bugs.webkit.org/show_bug.cgi?id=16889> <rdar://problem/5696255> <http://bugs.webkit.org/show_bug.cgi?id=17015> <http://bugs.webkit.org/show_bug.cgi?id=17164> <rdar://problem/5720947> The ActivationImp tear-off (r29425) introduced a problem with ReadModify nodes that first resolve a slot, call valueForReadModifyNode(), and then store a value in the previously resolved slot. Since valueForReadModifyNode() may cause a tear-off, the slot needs to be resolved again, but this was not happening with the existing code. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29997 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 04 Feb, 2008 3 commits
-
-
mrowe@apple.com authored
Reviewed by Geoff Garen. Remove some unneccesary UNUSED_PARAMs. Clarify ownership rule of return value of JSObjectCopyPropertyNames. * API/JSNode.c: (JSNode_appendChild): (JSNode_removeChild): (JSNode_replaceChild): (JSNode_getNodeType): (JSNode_getFirstChild): * API/JSNodeList.c: (JSNodeList_length): * API/JSObjectRef.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
http://bugs.webkit.org/show_bug.cgi?id=17175mrowe@apple.com authored
Reviewed by Alp Toker and Mark Rowe. Add global_cxxflags definition for inclusion in CXXFLAGS variables. Only use -fno-rtti and $(SYMBOL_VISIBILITY_INLINES) with global_cxxflags as gcc complains they aren't valid for C. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29986 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
alp@webkit.org authored
Rubber-stamped by Mark Rowe. Remove all trailing whitespace in the GTK+ port and related components. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 02 Feb, 2008 2 commits
-
-
ggaren@apple.com authored
Reviewed by Geoff Garen. PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4% slower due to r28884 (global variable symbol table optimization) Geoff's theory is that the slowdown was due to copying hash tables when putting things into the back/forward cache. If that's true, then this should fix the problem. (According to Geoff's measurements, in a PLT that exaggerates the importance of symbol table saving during cached page creation, this patch is a ~3X speedup in cached page creation, and a 9% speedup overall.) * JavaScriptCore.exp: Updated. * kjs/JSVariableObject.cpp: (KJS::JSVariableObject::saveLocalStorage): Updated for changes to SavedProperty, which has been revised to avoid initializing each SavedProperty twice when building the array. Store the property names too, so we don't have to store the symbol table separately. Do this by iterating the symbol table instead of the local storage vector. (KJS::JSVariableObject::restoreLocalStorage): Ditto. Restore the symbol table as well as the local storage vector. * kjs/JSVariableObject.h: Removed save/restoreSymbolTable and do that work inside save/restoreLocalStorage instead. Made restoreLocalStorage a non-const member function that takes a const reference to a SavedProperties object. * kjs/LocalStorage.h: Changed attributes to be unsigned instead of int to match other declarations of attributes elsewhere. * kjs/property_map.cpp: (KJS::SavedProperties::SavedProperties): Updated for data member name change. (KJS::PropertyMap::save): Updated for data member name change and to use the new inline init function instead of setting the fields directly. This allows us to skip initializing the SavedProperty objects when first allocating the array, and just do it when we're actually setting up the individual elements. (KJS::PropertyMap::restore): Updated for SavedProperty changes. * kjs/property_map.h: Changed SavedProperty from a struct to a class. Set it up so it does not get initialized at construction time to avoid initializing twice when creating an array of SavedProperty. Removed the m_ prefixes from the members of the SavedProperties struct. Generally we use m_ for class members and not struct. WebCore: Reviewed by Geoff Garen. PLT speedup related to <rdar://problem/5659272> REGRESSION: PLT .4% slower due to r28884 (global variable symbol table optimization) * history/CachedPage.cpp: (WebCore::CachedPage::CachedPage): Removed saveSymbolTable call. (WebCore::CachedPage::restore): Removed restoreSymbolTable call. (WebCore::CachedPage::clear): Removed clear of m_windowSymbolTable. * history/CachedPage.h: Removed m_windowSymbolTable, since save/restoreLocalStorage now takes care of the symbol table. Also removed many unnecessary includes. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
eric@webkit.org authored
Add #define guards for WIN32_LEAN_AND_MEAN and _CRT_RAND_S. * kjs/config.h: * wtf/FastMalloc.cpp: * wtf/TCSpinLock.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29941 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 01 Feb, 2008 1 commit
-
-
mrowe@apple.com authored
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 28 Jan, 2008 1 commit
-
-
weinig@apple.com authored
- Fix whitespace in nodes.h/cpp and nodes2string.cpp. (NOTE: Specific changed functions elided for space and clarity) * kjs/nodes.cpp: * kjs/nodes.h: * kjs/nodes2string.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-
- 27 Jan, 2008 1 commit
-
-
weinig@apple.com authored
Patch for http://bugs.webkit.org/show_bug.cgi?id=17025 nodes.h/cpp has been rolling around in the mud - lets hose it down - Rename member variables to use the m_ prefix. (NOTE: Specific changed functions elided for space and clarity) * kjs/grammar.y: * kjs/nodes.cpp: * kjs/nodes.h: * kjs/nodes2string.cpp: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
-