<rdar://problem/49515980>
Created attachment 379854 [details] Patch
Created attachment 379855 [details] Patch Include test
Comment on attachment 379855 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=379855&action=review > Source/JavaScriptCore/runtime/JSObjectInlines.h:482 > +#if !ASSERT_DISABLED > +#define VALIDATE_PUT_OWN_DATA_PROPERTY() \ > + do { \ > + ASSERT(value); \ > + ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this)); \ > + unsigned attributes; \ > + PropertyOffset offset = structure(vm)->get(vm, propertyName, attributes); \ > + if (isValidOffset(offset)) \ > + ASSERT(!(attributes & (PropertyAttribute::Accessor | PropertyAttribute::CustomAccessor | PropertyAttribute::ReadOnly))); \ > + else if (TypeInfo::hasStaticPropertyTable(inlineTypeFlags())) { \ > + if (auto entry = findPropertyHashEntry(vm, propertyName)) { \ > + ASSERT(!(entry->value->attributes() & (PropertyAttribute::Accessor | PropertyAttribute::CustomAccessor | PropertyAttribute::ReadOnly))); \ > + } \ > + } \ > + } while (false) > +#else > +#define VALIDATE_PUT_OWN_DATA_PROPERTY() > +#endif Why not making it as an inline function?
Comment on attachment 379855 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=379855&action=review Thanks for the review. >> Source/JavaScriptCore/runtime/JSObjectInlines.h:482 >> +#endif > > Why not making it as an inline function? I just didn't want to pass all the values through, but that does seem better. I'll update.
Created attachment 379861 [details] Patch Refactor validation into inline function
Comment on attachment 379861 [details] Patch Clearing flags on attachment: 379861 Committed r250543: <https://trac.webkit.org/changeset/250543>
All reviewed patches have been landed. Closing bug.