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

Side by Side Diff: src/bootstrapper.cc

Issue 11190050: Heavy cleanup of the external pointer API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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
OLDNEW
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 1222 matching lines...) Expand 10 before | Expand all | Expand 10 after
1233 Handle<JSFunction> delegate = 1233 Handle<JSFunction> delegate =
1234 factory->NewFunction(factory->empty_symbol(), JS_OBJECT_TYPE, 1234 factory->NewFunction(factory->empty_symbol(), JS_OBJECT_TYPE,
1235 JSObject::kHeaderSize, code, true); 1235 JSObject::kHeaderSize, code, true);
1236 native_context()->set_call_as_constructor_delegate(*delegate); 1236 native_context()->set_call_as_constructor_delegate(*delegate);
1237 delegate->shared()->DontAdaptArguments(); 1237 delegate->shared()->DontAdaptArguments();
1238 } 1238 }
1239 1239
1240 // Initialize the out of memory slot. 1240 // Initialize the out of memory slot.
1241 native_context()->set_out_of_memory(heap->false_value()); 1241 native_context()->set_out_of_memory(heap->false_value());
1242 1242
1243 // Initialize the data slot. 1243 // Initialize the embedder data slot.
1244 native_context()->set_data(heap->undefined_value()); 1244 native_context()->set_embedder_data(*factory->NewFixedArray(2));
Michael Starzinger 2012/10/25 09:41:53 This pattern is not GC-safe and GCMole will (hopef
Sven Panne 2012/10/25 14:23:08 Done.
1245 1245
1246 { 1246 {
1247 // Initialize the random seed slot. 1247 // Initialize the random seed slot.
1248 Handle<ByteArray> zeroed_byte_array( 1248 Handle<ByteArray> zeroed_byte_array(
1249 factory->NewByteArray(kRandomStateSize)); 1249 factory->NewByteArray(kRandomStateSize));
1250 native_context()->set_random_seed(*zeroed_byte_array); 1250 native_context()->set_random_seed(*zeroed_byte_array);
1251 memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize); 1251 memset(zeroed_byte_array->GetDataStartAddress(), 0, kRandomStateSize);
1252 } 1252 }
1253 return true; 1253 return true;
1254 } 1254 }
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
2399 return from + sizeof(NestingCounterType); 2399 return from + sizeof(NestingCounterType);
2400 } 2400 }
2401 2401
2402 2402
2403 // Called when the top-level V8 mutex is destroyed. 2403 // Called when the top-level V8 mutex is destroyed.
2404 void Bootstrapper::FreeThreadResources() { 2404 void Bootstrapper::FreeThreadResources() {
2405 ASSERT(!IsActive()); 2405 ASSERT(!IsActive());
2406 } 2406 }
2407 2407
2408 } } // namespace v8::internal 2408 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698