As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 774464 - JSScript::setSourceMap improperly handles OOM
: JSScript::setSourceMap improperly handles OOM
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla17
Assigned To: general
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2012-07-16 14:34 PDT by Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8]
Modified: 2012-07-17 02:12 PDT (History)
2 users (show)
jimb: in‑testsuite-
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

v1 (429 bytes, patch)
2012-07-16 14:36 PDT, Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8]
jimb: review+
Details | Diff | Splinter Review

Description User image Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8] 2012-07-16 14:34:02 PDT
When |putNew| fails, it deletes the whole |sourceMapMap| when there could be other entries in there. It should not do this.
Comment 1 User image Nick Fitzgerald [:fitzgen] [⏰PST; UTC-8] 2012-07-16 14:36:17 PDT
Created attachment 642731 [details] [diff] [review]
Comment 2 User image :Benjamin Peterson 2012-07-16 14:45:17 PDT
Comment on attachment 642731 [details] [diff] [review]

Review of attachment 642731 [details] [diff] [review]:

::: js/src/jsscript.cpp
@@ -857,3 @@
>      }
>      if (!map->putNew(this, sourceMap)) {

The braces here can be dropped now.
Comment 3 User image Jim Blandy :jimb 2012-07-16 15:00:59 PDT
Comment on attachment 642731 [details] [diff] [review]

Review of attachment 642731 [details] [diff] [review]:

This is fine, with the braces dropped as suggested.
Comment 5 User image Ed Morley [:emorley] 2012-07-17 02:12:06 PDT

Note You need to log in before you can comment on or make changes to this bug.