Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(372)

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_helper.dart

Issue 964853002: Let CSP-mode-flag be available as a foreign_helper constant. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_mirrors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
index 1b33108bd3b0a86bad1e98c4c6d815962d61dfd8..a4a109e60eb150bf9e310f1423646d0e8420d696 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -2259,7 +2259,7 @@ abstract class Closure implements Function {
}
}
- static bool get isCsp => JS('bool', 'typeof dart_precompiled == "function"');
+ static bool get isCsp => JS_GET_FLAG("USE_CONTENT_SECURITY_POLICY");
static forwardCallTo(receiver, function, bool isIntercepted) {
if (isIntercepted) return forwardInterceptedCallTo(receiver, function);
@@ -2376,7 +2376,7 @@ abstract class Closure implements Function {
String receiverField = BoundClosure.receiverFieldName();
String stubName = JS('String|Null', '#.\$stubName', function);
int arity = JS('int', '#.length', function);
- bool isCsp = JS('bool', 'typeof dart_precompiled == "function"');
+ bool isCsp = JS_GET_FLAG("USE_CONTENT_SECURITY_POLICY");
var lookedUpFunction = JS("", "#[#]", receiver, stubName);
// The receiver[stubName] may not be equal to the function if we try to
// forward to a super-method. Especially when we create a bound closure
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | sdk/lib/_internal/compiler/js_lib/js_mirrors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698