RESOLVED FIXED 152765
[ES6] Boolean, Number, Map, RegExp, and Set should be subclassable
https://bugs.webkit.org/show_bug.cgi?id=152765
Summary [ES6] Boolean, Number, Map, RegExp, and Set should be subclassable
Keith Miller
Reported 2016-01-05 17:08:15 PST
[ES6] Boolean, Number, Map, RegExp, and Set should be subclassable
Attachments
Patch (13.02 KB, patch)
2016-01-05 20:45 PST, Keith Miller
msaboff: review+
Keith Miller
Comment 1 2016-01-05 20:45:27 PST
Keith Miller
Comment 2 2016-01-06 10:00:16 PST
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review > Source/JavaScriptCore/tests/es6.yaml:1090 > + cmd: runES6 :normal For some reason the other subclassing tests were already marked as passing. I'm not sure why.
Michael Saboff
Comment 3 2016-01-06 10:11:01 PST
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review r=me with suggested changes. > Source/JavaScriptCore/runtime/BooleanConstructor.cpp:3 > - * Copyright (C) 2003, 2008 Apple Inc. All rights reserved. > + * Copyright (C) 2003-2016 Apple Inc. All rights reserved. I think you just want to add ", 2016" and not change it to a year range. > Source/JavaScriptCore/runtime/BooleanConstructor.h:3 > - * Copyright (C) 2008 Apple Inc. All rights reserved. > + * Copyright (C) 2008-2016 Apple Inc. All rights reserved. ditto > Source/JavaScriptCore/runtime/MapConstructor.cpp:2 > - * Copyright (C) 2013 Apple Inc. All rights reserved. > + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. ditto > Source/JavaScriptCore/runtime/NumberConstructor.cpp:3 > - * Copyright (C) 2007, 2008, 2011, 2015 Apple Inc. All rights reserved. > + * Copyright (C) 2007-2016 Apple Inc. All rights reserved. ditto > Source/JavaScriptCore/runtime/RegExpConstructor.cpp:3 > - * Copyright (C) 2003, 2007, 2008 Apple Inc. All Rights Reserved. > + * Copyright (C) 2003-2016 Apple Inc. All Rights Reserved. ditto > Source/JavaScriptCore/runtime/SetConstructor.cpp:2 > - * Copyright (C) 2013 Apple Inc. All rights reserved. > + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. ditto
Keith Miller
Comment 4 2016-01-06 10:20:04 PST
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review >> Source/JavaScriptCore/runtime/BooleanConstructor.cpp:3 >> + * Copyright (C) 2003-2016 Apple Inc. All rights reserved. > > I think you just want to add ", 2016" and not change it to a year range. Fixed. >> Source/JavaScriptCore/runtime/BooleanConstructor.h:3 >> + * Copyright (C) 2008-2016 Apple Inc. All rights reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/MapConstructor.cpp:2 >> + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/NumberConstructor.cpp:3 >> + * Copyright (C) 2007-2016 Apple Inc. All rights reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/RegExpConstructor.cpp:3 >> + * Copyright (C) 2003-2016 Apple Inc. All Rights Reserved. > > ditto Fixed. >> Source/JavaScriptCore/runtime/SetConstructor.cpp:2 >> + * Copyright (C) 2013-2016 Apple Inc. All rights reserved. > > ditto Fixed.
Keith Miller
Comment 5 2016-01-06 10:25:29 PST
Darin Adler
Comment 6 2016-01-15 10:29:40 PST
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review > Source/JavaScriptCore/runtime/BooleanConstructor.cpp:53 > + JSValue prototype = JSValue(); This is the same thing as: JSValue prototype; Just more wordy. Would be nice to clean that up. > Source/JavaScriptCore/runtime/MapConstructor.cpp:56 > + JSValue prototype = JSValue(); Ditto. > Source/JavaScriptCore/runtime/NumberConstructor.cpp:85 > + JSValue prototype = JSValue(); Ditto. > Source/JavaScriptCore/runtime/SetConstructor.cpp:57 > + JSValue prototype = JSValue(); Ditto.
Keith Miller
Comment 7 2016-01-15 10:40:58 PST
Comment on attachment 268351 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=268351&action=review >> Source/JavaScriptCore/runtime/BooleanConstructor.cpp:53 >> + JSValue prototype = JSValue(); > > This is the same thing as: > > JSValue prototype; > > Just more wordy. Would be nice to clean that up. I actually moved all the new.target.prototype stuff into a helper function in <http://trac.webkit.org/changeset/194863>. So it's already gone but I will look through some of my other patches and see if I put "JSValue prototype = JSValue();" anywhere else.
Note You need to log in before you can comment on or make changes to this bug.