[webkit-reviews] review granted: [Bug 202379] Make assertion in JSObject::putOwnDataProperty more precise : [Attachment 379855] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 30 16:42:12 PDT 2019
Yusuke Suzuki <ysuzuki at apple.com> has granted Tadeu Zagallo
<tzagallo at apple.com>'s request for review:
Bug 202379: Make assertion in JSObject::putOwnDataProperty more precise
https://bugs.webkit.org/show_bug.cgi?id=202379
Attachment 379855: Patch
https://bugs.webkit.org/attachment.cgi?id=379855&action=review
--- Comment #3 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 379855
--> https://bugs.webkit.org/attachment.cgi?id=379855
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?
More information about the webkit-reviews
mailing list