| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 Dart_Handle typedData = Dart_LookupLibrary(Dart_NewStringFromCString("dart:t
yped_data")); | 170 Dart_Handle typedData = Dart_LookupLibrary(Dart_NewStringFromCString("dart:t
yped_data")); |
| 171 ASSERT(!Dart_IsError(typedData)); | 171 ASSERT(!Dart_IsError(typedData)); |
| 172 domData->setTypedDataLibrary(Dart_NewPersistentHandle(typedData)); | 172 domData->setTypedDataLibrary(Dart_NewPersistentHandle(typedData)); |
| 173 | 173 |
| 174 // Setup configuration closures | 174 // Setup configuration closures |
| 175 const char * const printClosure = getenv("DART_FORWARDING_PRINT") ? | 175 const char * const printClosure = getenv("DART_FORWARDING_PRINT") ? |
| 176 "_forwardingPrintClosure" : | 176 "_forwardingPrintClosure" : |
| 177 (isDOMEnabled ? "_printClosure" : "_pureIsolatePrintClosure"); | 177 (isDOMEnabled ? "_printClosure" : "_pureIsolatePrintClosure"); |
| 178 copyValue(html, printClosure, "dart:_collection-dev", 0, "_printClosure"); | 178 copyValue(html, printClosure, "dart:_collection-dev", 0, "_printClosure"); |
| 179 copyValue(html, isDOMEnabled ? "_timerFactoryClosure" : "_pureIsolateTimerFa
ctoryClosure", "dart:async", "_TimerFactory", "_factory"); | 179 copyValue(html, isDOMEnabled ? "_timerFactoryClosure" : "_pureIsolateTimerFa
ctoryClosure", "dart:async", "_TimerFactory", "_factory"); |
| 180 copyValue(html, isDOMEnabled ? "_scheduleImmediateClosure" : "_pureIsolateSc
heduleImmediateClosure", "dart:async", "_ScheduleImmediate", "_closure"); |
| 180 | 181 |
| 181 if (isDOMEnabled) { | 182 if (isDOMEnabled) { |
| 182 // Create strongly reachable document wrapper. Document wrapper acts as
a | 183 // Create strongly reachable document wrapper. Document wrapper acts as
a |
| 183 // retainer for in-document node wrappers group. There is no need to des
troy | 184 // retainer for in-document node wrappers group. There is no need to des
troy |
| 184 // this persistent handle explicitly because we will shutdown the isolat
e on | 185 // this persistent handle explicitly because we will shutdown the isolat
e on |
| 185 // navigation. | 186 // navigation. |
| 186 Dart_Handle localHandle = DartDocument::toDart(document); | 187 Dart_Handle localHandle = DartDocument::toDart(document); |
| 187 Dart_PersistentHandle strongHandle = Dart_NewPersistentHandle(localHandl
e); | 188 Dart_PersistentHandle strongHandle = Dart_NewPersistentHandle(localHandl
e); |
| 188 // We need a weak handle to always reachable object to temporary render | 189 // We need a weak handle to always reachable object to temporary render |
| 189 // so weak handles strong, see the corresponding logic in | 190 // so weak handles strong, see the corresponding logic in |
| (...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 libraryIdMap->set(libraryId, scriptState); | 928 libraryIdMap->set(libraryId, scriptState); |
| 928 } else { | 929 } else { |
| 929 scriptState = libraryIter->value; | 930 scriptState = libraryIter->value; |
| 930 ASSERT(scriptState); | 931 ASSERT(scriptState); |
| 931 } | 932 } |
| 932 result.append(scriptState); | 933 result.append(scriptState); |
| 933 } | 934 } |
| 934 } | 935 } |
| 935 | 936 |
| 936 } | 937 } |
| OLD | NEW |