Bug 164958 - Fix missing exception checks in DFGOperations.cpp.
Summary: Fix missing exception checks in DFGOperations.cpp.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks: 162351
  Show dependency treegraph
 
Reported: 2016-11-18 14:28 PST by Mark Lam
Modified: 2016-11-18 17:46 PST (History)
8 users (show)

See Also:


Attachments
proposed patch. (9.93 KB, patch)
2016-11-18 14:45 PST, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff
patch for landing. (9.99 KB, patch)
2016-11-18 15:05 PST, Mark Lam
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2016-11-18 14:28:13 PST
Patch coming.
Comment 1 Mark Lam 2016-11-18 14:45:52 PST
Created attachment 295196 [details]
proposed patch.
Comment 2 Geoffrey Garen 2016-11-18 14:54:36 PST
Comment on attachment 295196 [details]
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=295196&action=review

r=me

> Source/JavaScriptCore/dfg/DFGOperations.cpp:144
> +        if (Optional<uint32_t> index = parseIndex(propertyName)) {
> +            scope.release();
>              asObject(baseValue)->putDirectIndex(exec, index.value(), value, 0, strict ? PutDirectIndexShouldThrow : PutDirectIndexShouldNotThrow);
> -        else
> +        } else
>              asObject(baseValue)->putDirect(*vm, propertyName, value, slot);
> -    } else
> +    } else {
> +        scope.release();
>          baseValue.put(exec, propertyName, value, slot);
> +    }
>  }

It's a little sketchy to have a scope.release() not immediately before a return. I think we should switch the if/else format to if/return.
Comment 3 Mark Lam 2016-11-18 15:05:12 PST
Created attachment 295198 [details]
patch for landing.

Thanks for the review.  I applied the suggested change.
Comment 4 WebKit Commit Bot 2016-11-18 17:46:08 PST
Comment on attachment 295198 [details]
patch for landing.

Clearing flags on attachment: 295198

Committed r208913: <http://trac.webkit.org/changeset/208913>
Comment 5 WebKit Commit Bot 2016-11-18 17:46:13 PST
All reviewed patches have been landed.  Closing bug.