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 4295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4306 } | 4306 } |
4307 ENTER_V8(isolate); | 4307 ENTER_V8(isolate); |
4308 i::Object** ctx = reinterpret_cast<i::Object**>(this); | 4308 i::Object** ctx = reinterpret_cast<i::Object**>(this); |
4309 i::Handle<i::Context> context = | 4309 i::Handle<i::Context> context = |
4310 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); | 4310 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); |
4311 context->set_allow_code_gen_from_strings( | 4311 context->set_allow_code_gen_from_strings( |
4312 allow ? isolate->heap()->true_value() : isolate->heap()->false_value()); | 4312 allow ? isolate->heap()->true_value() : isolate->heap()->false_value()); |
4313 } | 4313 } |
4314 | 4314 |
4315 | 4315 |
| 4316 bool Context::CodeGenerationFromStringsAllowed() { |
| 4317 i::Isolate* isolate = i::Isolate::Current(); |
| 4318 if (IsDeadCheck(isolate, "v8::Context::CodeGenerationFromStringsAllowed()")) { |
| 4319 return false; |
| 4320 } |
| 4321 ENTER_V8(isolate); |
| 4322 i::Object** ctx = reinterpret_cast<i::Object**>(this); |
| 4323 i::Handle<i::Context> context = |
| 4324 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx)); |
| 4325 return !context->allow_code_gen_from_strings()->IsFalse(); |
| 4326 } |
| 4327 |
| 4328 |
4316 void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) { | 4329 void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) { |
4317 i::GlobalHandles::SetWrapperClassId(global_handle, class_id); | 4330 i::GlobalHandles::SetWrapperClassId(global_handle, class_id); |
4318 } | 4331 } |
4319 | 4332 |
4320 | 4333 |
4321 Local<v8::Object> ObjectTemplate::NewInstance() { | 4334 Local<v8::Object> ObjectTemplate::NewInstance() { |
4322 i::Isolate* isolate = i::Isolate::Current(); | 4335 i::Isolate* isolate = i::Isolate::Current(); |
4323 ON_BAILOUT(isolate, "v8::ObjectTemplate::NewInstance()", | 4336 ON_BAILOUT(isolate, "v8::ObjectTemplate::NewInstance()", |
4324 return Local<v8::Object>()); | 4337 return Local<v8::Object>()); |
4325 LOG_API(isolate, "ObjectTemplate::NewInstance"); | 4338 LOG_API(isolate, "ObjectTemplate::NewInstance"); |
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6174 | 6187 |
6175 | 6188 |
6176 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 6189 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
6177 HandleScopeImplementer* scope_implementer = | 6190 HandleScopeImplementer* scope_implementer = |
6178 reinterpret_cast<HandleScopeImplementer*>(storage); | 6191 reinterpret_cast<HandleScopeImplementer*>(storage); |
6179 scope_implementer->IterateThis(v); | 6192 scope_implementer->IterateThis(v); |
6180 return storage + ArchiveSpacePerThread(); | 6193 return storage + ArchiveSpacePerThread(); |
6181 } | 6194 } |
6182 | 6195 |
6183 } } // namespace v8::internal | 6196 } } // namespace v8::internal |
OLD | NEW |