Commit e0d608a2 authored by vogelheim's avatar vogelheim Committed by Commit bot

Fix 'combo breaker' in CreateDynamicFunction to handle template literals.

BUG=chromium:663410

Review-Url: https://codereview.chromium.org/2533463002
Cr-Commit-Position: refs/heads/master@{#41320}
parent 54aac1f7
...@@ -61,7 +61,7 @@ MaybeHandle<Object> CreateDynamicFunction(Isolate* isolate, ...@@ -61,7 +61,7 @@ MaybeHandle<Object> CreateDynamicFunction(Isolate* isolate,
// If the formal parameters include an unbalanced block comment, the // If the formal parameters include an unbalanced block comment, the
// function must be rejected. Since JavaScript does not allow nested // function must be rejected. Since JavaScript does not allow nested
// comments we can include a trailing block comment to catch this. // comments we can include a trailing block comment to catch this.
builder.AppendCString("\n/**/"); builder.AppendCString("\n/*``*/");
} }
builder.AppendCString(") {\n"); builder.AppendCString(") {\n");
if (argc > 0) { if (argc > 0) {
......
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
function alert(x) {};
assertThrows(
Function("a=`","`,xss=1){alert(xss)")
);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment