OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |