Changeset 84670 in webkit
- Timestamp:
- Apr 22, 2011 1:11:08 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r84665 r84670 1 2011-04-22 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Gavin Barraclough and Oliver Hunt. 4 5 Arrays should participate in global object forwarding fun 6 https://bugs.webkit.org/show_bug.cgi?id=59215 7 8 - Update results of prototype-inheritance-2 for new array behavior. 9 - Remove checks for primitives, since they were incorrect. 10 - Force function check to check a function not on a primitive (this 11 wasn't happening by itself, since functions normally aren't enumerable 12 in the DOM). 13 - Add exception to the test to not try and test HTMLProgressElement, since 14 it is not available on all platforms. This allows us to remove the windows 15 specific results. 16 17 * fast/dom/prototype-inheritance-2-expected.txt: 18 * fast/dom/script-tests/prototype-inheritance-2.js: 19 (constructorNamesForWindow): 20 (crawl): 21 * platform/win/fast/dom/prototype-inheritance-2-expected.txt: Removed. 22 1 23 2011-04-21 Geoffrey Garen <ggaren@apple.com> 2 24 -
trunk/LayoutTests/fast/dom/prototype-inheritance-2-expected.txt
r84641 r84670 4 4 5 5 6 FAILArray from inner.document.forms.testForm.0.ownerDocument.defaultView.console.profiles6 PASS Array from inner.document.forms.testForm.0.ownerDocument.defaultView.console.profiles 7 7 PASS Attr from inner.document.forms.testForm.0.attributes.0 8 8 PASS AttrConstructor from inner.document.forms.testForm.0.attributes.0.constructor … … 10 10 PASS BarInfo from inner.document.forms.testForm.0.ownerDocument.defaultView.menubar 11 11 PASS BarInfoPrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.menubar.__proto__ 12 FAIL Boolean from inner.document.forms.testForm.0.noValidate13 12 PASS CSSCharsetRule from inner.document.getElementById("dummyStyle").sheet.cssRules.0 14 13 PASS CSSCharsetRuleConstructor from inner.document.getElementById("dummyStyle").sheet.cssRules.0.constructor … … 88 87 PASS DocumentPrototype from inner.document.forms.testForm.0.ownerDocument.__proto__.__proto__ 89 88 PASS ElementPrototype from inner.document.forms.testForm.0.__proto__.__proto__.__proto__ 90 FAIL Function from inner.document.location.protocol.constructor 89 PASS Function from inner.document.createElement 91 90 PASS HTMLAnchorElement from inner.document.forms.testForm.0.parentNode.firstElementChild 92 91 PASS HTMLAnchorElementConstructor from inner.document.forms.testForm.0.parentNode.firstElementChild.constructor … … 173 172 PASS NodeListPrototype from inner.document.forms.testForm.__proto__ 174 173 PASS NodePrototype from inner.document.forms.testForm.0.attributes.0.__proto__.__proto__ 175 FAIL Number from inner.document.forms.testForm.length176 174 PASS Object from inner.document.location.__proto__.__proto__ 177 175 PASS Plugin from inner.document.forms.testForm.0.ownerDocument.defaultView.clientInformation.mimeTypes.0.enabledPlugin … … 196 194 PASS StorageConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.localStorage.constructor 197 195 PASS StoragePrototype from inner.document.forms.testForm.0.ownerDocument.defaultView.localStorage.__proto__ 198 FAIL String from inner.document.location.protocol199 196 PASS StyleMedia from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia 200 197 PASS StyleMediaConstructor from inner.document.forms.testForm.0.ownerDocument.defaultView.styleMedia.constructor … … 274 271 Never found HTMLParamElement 275 272 Never found HTMLPreElement 276 Never found HTMLProgressElement277 273 Never found HTMLQuoteElement 278 274 Never found HTMLScriptElement -
trunk/LayoutTests/fast/dom/script-tests/prototype-inheritance-2.js
r83884 r84670 82 82 type == "FileErrorConstructor" || 83 83 type == "FileReaderConstructor" || 84 type == "WebKitBlobBuilderConstructor") 84 type == "WebKitBlobBuilderConstructor" || 85 type == "HTMLProgressElementConstructor") 85 86 continue; // We ignore WebGLRenderingContext and test it elsewhere, since it is not in all builds 86 87 if (!type.match('Constructor$')) … … 159 160 continue; 160 161 } 162 if (typeof(object) == "string") 163 continue; 164 if (typeof(object) == "boolean") 165 continue; 166 if (typeof(object) == "number") 167 continue; 161 168 162 169 resultsByType[type] = makeCrawlObject(object.isInner, crawlTarget.valuePath); … … 224 231 225 232 var crawlStartPaths = [ 233 evalToCrawlObject('inner.document.createElement'), 226 234 evalToCrawlObject('inner.document.location'), // window.location is tested by other tests, so test document.location in this one. 227 235 //evalToCrawlObject('inner.testForm'), // Causes many failures -
trunk/Source/JavaScriptCore/ChangeLog
r84660 r84670 1 2011-04-22 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Gavin Barraclough and Oliver Hunt. 4 5 Arrays should participate in global object forwarding fun 6 https://bugs.webkit.org/show_bug.cgi?id=59215 7 8 * runtime/JSGlobalObject.h: 9 (JSC::constructEmptyArray): 10 (JSC::constructArray): 11 Add variants of constructArray that take a global object. 12 1 13 2011-04-22 Sheriff Bot <webkit.review.bot@gmail.com> 2 14 -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r84556 r84670 405 405 return constructEmptyObject(exec, exec->lexicalGlobalObject()); 406 406 } 407 408 inline JSArray* constructEmptyArray(ExecState* exec, JSGlobalObject* globalObject) 409 { 410 return new (exec) JSArray(exec->globalData(), globalObject->arrayStructure()); 411 } 407 412 408 413 inline JSArray* constructEmptyArray(ExecState* exec) 409 414 { 410 return new (exec) JSArray(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure());411 } 412 413 inline JSArray* constructEmptyArray(ExecState* exec, JSGlobalObject* globalObject )414 { 415 return new (exec) JSArray(exec->globalData(), globalObject->arrayStructure() );415 return constructEmptyArray(exec, exec->lexicalGlobalObject()); 416 } 417 418 inline JSArray* constructEmptyArray(ExecState* exec, JSGlobalObject* globalObject, unsigned initialLength) 419 { 420 return new (exec) JSArray(exec->globalData(), globalObject->arrayStructure(), initialLength, CreateInitialized); 416 421 } 417 422 418 423 inline JSArray* constructEmptyArray(ExecState* exec, unsigned initialLength) 419 424 { 420 return new (exec) JSArray(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure(), initialLength, CreateInitialized);421 } 422 423 inline JSArray* constructArray(ExecState* exec, JS Value singleItemValue)425 return constructEmptyArray(exec, exec->lexicalGlobalObject(), initialLength); 426 } 427 428 inline JSArray* constructArray(ExecState* exec, JSGlobalObject* globalObject, JSValue singleItemValue) 424 429 { 425 430 MarkedArgumentBuffer values; 426 431 values.append(singleItemValue); 427 return new (exec) JSArray(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure(), values); 432 return new (exec) JSArray(exec->globalData(), globalObject->arrayStructure(), values); 433 } 434 435 inline JSArray* constructArray(ExecState* exec, JSValue singleItemValue) 436 { 437 return constructArray(exec, exec->lexicalGlobalObject(), singleItemValue); 438 } 439 440 inline JSArray* constructArray(ExecState* exec, JSGlobalObject* globalObject, const ArgList& values) 441 { 442 return new (exec) JSArray(exec->globalData(), globalObject->arrayStructure(), values); 428 443 } 429 444 430 445 inline JSArray* constructArray(ExecState* exec, const ArgList& values) 431 446 { 432 return new (exec) JSArray(exec->globalData(), exec->lexicalGlobalObject()->arrayStructure(), values);447 return constructArray(exec, exec->lexicalGlobalObject(), values); 433 448 } 434 449 -
trunk/Source/WebCore/ChangeLog
r84668 r84670 1 2011-04-22 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Gavin Barraclough and Oliver Hunt. 4 5 Arrays should participate in global object forwarding fun 6 https://bugs.webkit.org/show_bug.cgi?id=59215 7 8 Change callers of constructArray to use the new variant that takes 9 a global object. 10 11 * bindings/js/JSClipboardCustom.cpp: 12 (WebCore::JSClipboard::types): 13 * bindings/js/JSConsoleCustom.cpp: 14 (WebCore::JSConsole::profiles): 15 * bindings/js/JSJavaScriptCallFrameCustom.cpp: 16 (WebCore::JSJavaScriptCallFrame::scopeChain): 17 * bindings/js/JSMessageEventCustom.cpp: 18 (WebCore::JSMessageEvent::ports): 19 * bindings/js/JSScriptProfileNodeCustom.cpp: 20 (WebCore::JSScriptProfileNode::children): 21 * bindings/js/JSWebGLRenderingContextCustom.cpp: 22 (WebCore::toJS): 23 (WebCore::JSWebGLRenderingContext::getAttachedShaders): 24 (WebCore::JSWebGLRenderingContext::getSupportedExtensions): 25 1 26 2011-04-22 Csaba Osztrogonác <ossy@webkit.org> 2 27 -
trunk/Source/WebCore/bindings/js/JSClipboardCustom.cpp
r67973 r84670 61 61 for (HashSet<String>::const_iterator it = types.begin(); it != end; ++it) 62 62 list.append(jsString(exec, stringToUString(*it))); 63 return constructArray(exec, list);63 return constructArray(exec, globalObject(), list); 64 64 } 65 65 -
trunk/Source/WebCore/bindings/js/JSConsoleCustom.cpp
r84641 r84670 53 53 list.append(toJS(exec, globalObject(), iter->get())); 54 54 55 return constructArray(exec, list);55 return constructArray(exec, globalObject(), list); 56 56 } 57 57 -
trunk/Source/WebCore/bindings/js/JSJavaScriptCallFrameCustom.cpp
r82060 r84670 84 84 } while (iter != end); 85 85 86 return constructArray(exec, list);86 return constructArray(exec, globalObject(), list); 87 87 } 88 88 -
trunk/Source/WebCore/bindings/js/JSMessageEventCustom.cpp
r83645 r84670 52 52 for (size_t i = 0; i < ports->size(); i++) 53 53 list.append(toJS(exec, globalObject(), (*ports)[i].get())); 54 return constructArray(exec, list);54 return constructArray(exec, globalObject(), list); 55 55 } 56 56 -
trunk/Source/WebCore/bindings/js/JSScriptProfileNodeCustom.cpp
r84641 r84670 58 58 list.append(toJS(exec, globalObject(), iter->get())); 59 59 60 return constructArray(exec, list);60 return constructArray(exec, globalObject(), list); 61 61 } 62 62 -
trunk/Source/WebCore/bindings/js/JSWebGLRenderingContextCustom.cpp
r84556 r84670 90 90 for (size_t ii = 0; ii < value.size(); ++ii) 91 91 list.append(jsBoolean(value[ii])); 92 return constructArray(exec, list);92 return constructArray(exec, globalObject, list); 93 93 } 94 94 case WebGLGetInfo::kTypeFloat: … … 224 224 for (size_t ii = 0; ii < shaders.size(); ++ii) 225 225 list.append(toJS(exec, globalObject(), shaders[ii])); 226 return constructArray(exec, list);226 return constructArray(exec, globalObject(), list); 227 227 } 228 228 … … 343 343 for (size_t ii = 0; ii < value.size(); ++ii) 344 344 list.append(jsString(exec, value[ii])); 345 return constructArray(exec, list);345 return constructArray(exec, globalObject(), list); 346 346 } 347 347
Note: See TracChangeset
for help on using the changeset viewer.