[Webkit-unassigned] [Bug 48953] New: Unexpected TypeError: Result of expression [[object DOMWindowConstructor]] is not a constructor
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 3 14:13:28 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=48953
Summary: Unexpected TypeError: Result of expression [[object
DOMWindowConstructor]] is not a constructor
Product: WebKit
Version: 528+ (Nightly build)
Platform: Macintosh Intel
OS/Version: Mac OS X 10.6
Status: UNCONFIRMED
Severity: Major
Priority: P2
Component: JavaScriptCore
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: matt11ag-webkitbugs at yahoo.com
In the latest WebKit nightly, I am seeing an unexpected error message:
TypeError: Result of expression 'TestSample' [[object DOMWindowConstructor]] is not a constructor.
for code that works just fine in Apple Safari 5.0.2, Google Chrome 7.0.517.41, and Firefox 3.6.11.
----
var constructor = new Function("id", "desc", "this.id = id; this.description = desc;");
constructor.prototype.setDescription = function(desc){this.description = desc};
constructor.prototype.getDescription = function(){return this.description};
// Changing the order of the following 2 lines does not make a difference:
window["TestSample"] = constructor;
constructor.getInstanceFromFactory = function (id, desc){return new TestSample(id, desc);};
var sample = TestSample.getInstanceFromFactory("hello","success if you see this");
alert(sample.getDescription());
----
Expected result is that you see an alert with the text "success if you see this" but in WebKit nightly, the above JavaScript TypeError is logged in the JavaScript console instead.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list