Last Comment Bug 772691 - ban xml in function defaults
: ban xml in function defaults
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla16
Assigned To: :Benjamin Peterson
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2012-07-10 16:41 PDT by :Benjamin Peterson
Modified: 2012-07-11 09:31 PDT (History)
2 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

ban XML in defaults (5.40 KB, patch)
2012-07-10 17:15 PDT, :Benjamin Peterson
n.nethercote: review+
Details | Diff | Splinter Review

Description User image :Benjamin Peterson 2012-07-10 16:41:53 PDT
Even after bug 769072, you can put XML in function defaults like:
function f(a=<x/>) { "use strict"; }

This is because XML doesn't report strict errors. Let's just completely ban XML in defaults.
Comment 1 User image :Benjamin Peterson 2012-07-10 17:15:33 PDT
Created attachment 640865 [details] [diff] [review]
ban XML in defaults

Not exactly straight forward, but I think we're escaping E4X with only a few scratches.
Comment 2 User image Nicholas Nethercote [:njn] 2012-07-10 17:37:43 PDT
Comment on attachment 640865 [details] [diff] [review]
ban XML in defaults

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

The best thing about this patch is that it will be removed in the not-too-distant future, when e4x is removed :)
Comment 3 User image Ryan VanderMeulen [:RyanVM] 2012-07-10 18:42:57 PDT
Comment 4 User image Ed Morley [:emorley] 2012-07-11 09:31:49 PDT

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