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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/old_emitter/reflection_data_parser.dart

Issue 804193004: Fix error in csp output. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 // TODO(ahe): Share these with js_helper.dart. 7 // TODO(ahe): Share these with js_helper.dart.
8 const FUNCTION_INDEX = 0; 8 const FUNCTION_INDEX = 0;
9 const NAME_INDEX = 1; 9 const NAME_INDEX = 1;
10 const CALL_NAME_INDEX = 2; 10 const CALL_NAME_INDEX = 2;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // object and copy over the members. 360 // object and copy over the members.
361 jsAst.Statement finishClasses = js.statement('''{ 361 jsAst.Statement finishClasses = js.statement('''{
362 function finishClasses(processedClasses) { 362 function finishClasses(processedClasses) {
363 if (#debugFastObjects) 363 if (#debugFastObjects)
364 print("Number of classes: " + 364 print("Number of classes: " +
365 Object.getOwnPropertyNames(processedClasses.collected).length); 365 Object.getOwnPropertyNames(processedClasses.collected).length);
366 366
367 var allClasses = #allClasses; 367 var allClasses = #allClasses;
368 368
369 if (#inCspMode) { 369 if (#inCspMode) {
370 constructors = dart_precompiled(processedClasses.collected); 370 var constructors = dart_precompiled(processedClasses.collected);
Johnni Winther 2015/01/05 11:23:57 Why do we need to store it?
371 } 371 }
372 372
373 if (#notInCspMode) { 373 if (#notInCspMode) {
374 processedClasses.combinedConstructorFunction += 374 processedClasses.combinedConstructorFunction +=
375 "return [\\n" + processedClasses.constructorsList.join(",\\n ") + 375 "return [\\n" + processedClasses.constructorsList.join(",\\n ") +
376 "\\n]"; 376 "\\n]";
377 var constructors = 377 var constructors =
378 new Function("\$collectedClasses", 378 new Function("\$collectedClasses",
379 processedClasses.combinedConstructorFunction) 379 processedClasses.combinedConstructorFunction)
380 (processedClasses.collected); 380 (processedClasses.collected);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 (function() { 559 (function() {
560 var result = $array[$index]; 560 var result = $array[$index];
561 if ($check) { 561 if ($check) {
562 throw new Error( 562 throw new Error(
563 name + ": expected value of type \'$type\' at index " + ($index) + 563 name + ": expected value of type \'$type\' at index " + ($index) +
564 " but got " + (typeof result)); 564 " but got " + (typeof result));
565 } 565 }
566 return result; 566 return result;
567 })()'''; 567 })()''';
568 } 568 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698