WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
149554
Add support for WebIDL JSBuiltin attributes
https://bugs.webkit.org/show_bug.cgi?id=149554
Summary
Add support for WebIDL JSBuiltin attributes
youenn fablet
Reported
2015-09-25 02:46:40 PDT
JSBuiltin is currently only supported for methods.
Attachments
Patch
(14.84 KB, patch)
2015-09-25 06:41 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(15.23 KB, patch)
2015-09-29 00:13 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2015-09-25 06:41:33 PDT
Created
attachment 261922
[details]
Patch
WebKit Commit Bot
Comment 2
2015-09-25 10:47:41 PDT
Attachment 261922
[details]
did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/Lookup.cpp:39: Should be indented on a separate line, with the colon or comma first on that line. [whitespace/indent] [4] ERROR: Source/JavaScriptCore/runtime/Lookup.cpp:40: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/runtime/Lookup.cpp:42: Wrong number of spaces before statement. (expected: 16) [whitespace/indent] [4] Total errors found: 3 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Xabier Rodríguez Calvar
Comment 3
2015-09-28 02:11:53 PDT
LGTM
Darin Adler
Comment 4
2015-09-28 16:01:42 PDT
Comment on
attachment 261922
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=261922&action=review
> Source/JavaScriptCore/runtime/Lookup.cpp:40 > + accessor->setGetter(vm, globalObject, value.attributes() & Builtin ? > + JSFunction::createBuiltinFunction(vm, value.builtinAccessorGetterGenerator()(vm), globalObject, *getterName) : > + JSFunction::create(vm, globalObject, 0, *getterName, value.accessorGetter()));
WebKit coding style formatting for this puts the ? and the : at the beginning of the second and third lines, not the end of the first and second.
> Source/JavaScriptCore/runtime/Lookup.h:82 > + BuiltinGenerator builtinAccessorGetterGenerator() const { ASSERT(m_attributes & Accessor && m_attributes & Builtin); return reinterpret_cast<BuiltinGenerator>(m_values.value1); } > + BuiltinGenerator builtinAccessorSetterGenerator() const { ASSERT(m_attributes & Accessor && m_attributes & Builtin); return reinterpret_cast<BuiltinGenerator>(m_values.value2); }
Normally we’d write these as two separate assertions rather than using &&.
youenn fablet
Comment 5
2015-09-29 00:13:27 PDT
Created
attachment 262046
[details]
Patch for landing
youenn fablet
Comment 6
2015-09-29 00:14:53 PDT
Thanks for the review! (In reply to
comment #4
)
> Comment on
attachment 261922
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=261922&action=review
> > > Source/JavaScriptCore/runtime/Lookup.cpp:40 > > + accessor->setGetter(vm, globalObject, value.attributes() & Builtin ? > > + JSFunction::createBuiltinFunction(vm, value.builtinAccessorGetterGenerator()(vm), globalObject, *getterName) : > > + JSFunction::create(vm, globalObject, 0, *getterName, value.accessorGetter())); > > WebKit coding style formatting for this puts the ? and the : at the > beginning of the second and third lines, not the end of the first and second.
Fixed.
> > > Source/JavaScriptCore/runtime/Lookup.h:82 > > + BuiltinGenerator builtinAccessorGetterGenerator() const { ASSERT(m_attributes & Accessor && m_attributes & Builtin); return reinterpret_cast<BuiltinGenerator>(m_values.value1); } > > + BuiltinGenerator builtinAccessorSetterGenerator() const { ASSERT(m_attributes & Accessor && m_attributes & Builtin); return reinterpret_cast<BuiltinGenerator>(m_values.value2); } > > Normally we’d write these as two separate assertions rather than using &&.
Fixed by moving the implementation as inline.
WebKit Commit Bot
Comment 7
2015-09-29 01:01:34 PDT
Comment on
attachment 262046
[details]
Patch for landing Clearing flags on attachment: 262046 Committed
r190305
: <
http://trac.webkit.org/changeset/190305
>
WebKit Commit Bot
Comment 8
2015-09-29 01:01:41 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug