| OLD | NEW |
| 1 // Copyright (c) 2009, Google Inc. | 1 // Copyright (c) 2009, Google Inc. |
| 2 // All rights reserved. | 2 // 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 Dart_FinalizeLoading(false); | 433 Dart_FinalizeLoading(false); |
| 434 Dart_Handle exception = 0; | 434 Dart_Handle exception = 0; |
| 435 JsInterop::buildInteropPatchFiles(DartDOMData::current(), &patch
es, exception); | 435 JsInterop::buildInteropPatchFiles(DartDOMData::current(), &patch
es, exception); |
| 436 if (exception) { | 436 if (exception) { |
| 437 DartUtilities::reportProblem(m_originDocument, exception, m_
scriptUrlString); | 437 DartUtilities::reportProblem(m_originDocument, exception, m_
scriptUrlString); |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 // TODO(jacobr): do we need to cleanup the dartDOMData for the isola
te? | 440 // TODO(jacobr): do we need to cleanup the dartDOMData for the isola
te? |
| 441 Dart_ShutdownIsolate(); | 441 Dart_ShutdownIsolate(); |
| 442 free(script_snapshot); | 442 free(script_snapshot); |
| 443 | 443 Dart_IsolateMakeRunnable(applicationIsolate); |
| 444 Dart_EnterIsolate(applicationIsolate); | 444 Dart_EnterIsolate(applicationIsolate); |
| 445 } | 445 } |
| 446 | 446 |
| 447 { | 447 { |
| 448 Dart_Handle mainLibrary = topLevelLibrary(); | 448 Dart_Handle mainLibrary = topLevelLibrary(); |
| 449 | 449 |
| 450 // Trampoline to invoke main. | 450 // Trampoline to invoke main. |
| 451 // FIXME: Use the page library instead. To do this, we need to impor
t each script tag's library into the page | 451 // FIXME: Use the page library instead. To do this, we need to impor
t each script tag's library into the page |
| 452 // with a unique prefix to ensure a secondary script doesn't define
a main. | 452 // with a unique prefix to ensure a secondary script doesn't define
a main. |
| 453 String trampolineUrl = m_scriptUrlString + "$trampoline"; | 453 String trampolineUrl = m_scriptUrlString + "$trampoline"; |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 768 | 768 |
| 769 void DartApplicationLoader::reportError(const String& error, const String& url) | 769 void DartApplicationLoader::reportError(const String& error, const String& url) |
| 770 { | 770 { |
| 771 if (m_state < Running) | 771 if (m_state < Running) |
| 772 m_state = Error; | 772 m_state = Error; |
| 773 m_loadCallback->reportError(error, url); | 773 m_loadCallback->reportError(error, url); |
| 774 } | 774 } |
| 775 | 775 |
| 776 | 776 |
| 777 } | 777 } |
| OLD | NEW |