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

Side by Side Diff: Source/bindings/core/dart/DartInjectedScript.cpp

Issue 1653163002: Dart snapshot runs & and few other misc things. (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/2454_1
Patch Set: Created 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/core/dart/DartUtilities.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 Dart_CodeLocation location; 836 Dart_CodeLocation location;
837 Dart_Handle ret = Dart_GetClosureInfo(object->handle(), &name, 0, &locat ion); 837 Dart_Handle ret = Dart_GetClosureInfo(object->handle(), &name, 0, &locat ion);
838 if (Dart_IsError(ret) || !debugServer.resolveCodeLocation(location, &lin e, &column)) { 838 if (Dart_IsError(ret) || !debugServer.resolveCodeLocation(location, &lin e, &column)) {
839 // Avoid returning an error for this case which can legitimately 839 // Avoid returning an error for this case which can legitimately
840 // occur if the function was the result of calling Dart_EvaluateExpr . 840 // occur if the function was the result of calling Dart_EvaluateExpr .
841 RefPtr<Location> locationJson = Location::create() 841 RefPtr<Location> locationJson = Location::create()
842 .setScriptId("INVALID_SCRIPT_ID") 842 .setScriptId("INVALID_SCRIPT_ID")
843 .setLineNumber(0); 843 .setLineNumber(0);
844 844
845 *result = FunctionDetails::create() 845 *result = FunctionDetails::create()
846 .setIsGenerator(true) 846 .setIsGenerator(false)
847 .setFunctionName("DartClosure") 847 .setFunctionName("DartClosure")
848 .release(); 848 .release();
849 (*result)->setLocation(locationJson); 849 (*result)->setLocation(locationJson);
850 return; 850 return;
851 } 851 }
852 url = location.script_url; 852 url = location.script_url;
853 break; 853 break;
854 } 854 }
855 case DartDebuggerObject::Method: 855 case DartDebuggerObject::Method:
856 { 856 {
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1451 RefPtr<JSONValue> parsedObjectId = parseJSON(objectId); 1451 RefPtr<JSONValue> parsedObjectId = parseJSON(objectId);
1452 if (parsedObjectId && parsedObjectId->type() == JSONValue::TypeObject) { 1452 if (parsedObjectId && parsedObjectId->type() == JSONValue::TypeObject) {
1453 bool isDart = false; 1453 bool isDart = false;
1454 bool success = parsedObjectId->asObject()-> getBoolean("isDart", &isDart ); 1454 bool success = parsedObjectId->asObject()-> getBoolean("isDart", &isDart );
1455 return success && isDart; 1455 return success && isDart;
1456 } 1456 }
1457 return false; 1457 return false;
1458 } 1458 }
1459 1459
1460 } // namespace blink 1460 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/core/dart/DartUtilities.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698