OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 5267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5278 isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds( | 5278 isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds( |
5279 &visitor_adapter); | 5279 &visitor_adapter); |
5280 } | 5280 } |
5281 | 5281 |
5282 | 5282 |
5283 bool v8::V8::IdleNotification(int hint) { | 5283 bool v8::V8::IdleNotification(int hint) { |
5284 // Returning true tells the caller that it need not | 5284 // Returning true tells the caller that it need not |
5285 // continue to call IdleNotification. | 5285 // continue to call IdleNotification. |
5286 i::Isolate* isolate = i::Isolate::Current(); | 5286 i::Isolate* isolate = i::Isolate::Current(); |
5287 if (isolate == NULL || !isolate->IsInitialized()) return true; | 5287 if (isolate == NULL || !isolate->IsInitialized()) return true; |
5288 return i::V8::IdleNotification(hint); | 5288 if (!i::FLAG_use_idle_notification) return true; |
| 5289 return isolate->heap()->IdleNotification(hint); |
5289 } | 5290 } |
5290 | 5291 |
5291 | 5292 |
5292 void v8::V8::LowMemoryNotification() { | 5293 void v8::V8::LowMemoryNotification() { |
5293 i::Isolate* isolate = i::Isolate::Current(); | 5294 i::Isolate* isolate = i::Isolate::Current(); |
5294 if (isolate == NULL || !isolate->IsInitialized()) return; | 5295 if (isolate == NULL || !isolate->IsInitialized()) return; |
5295 isolate->heap()->CollectAllAvailableGarbage("low memory notification"); | 5296 isolate->heap()->CollectAllAvailableGarbage("low memory notification"); |
5296 } | 5297 } |
5297 | 5298 |
5298 | 5299 |
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7866 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7867 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7867 Address callback_address = | 7868 Address callback_address = |
7868 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7869 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7869 VMState<EXTERNAL> state(isolate); | 7870 VMState<EXTERNAL> state(isolate); |
7870 ExternalCallbackScope call_scope(isolate, callback_address); | 7871 ExternalCallbackScope call_scope(isolate, callback_address); |
7871 return callback(info); | 7872 return callback(info); |
7872 } | 7873 } |
7873 | 7874 |
7874 | 7875 |
7875 } } // namespace v8::internal | 7876 } } // namespace v8::internal |
OLD | NEW |