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

Side by Side Diff: src/api.cc

Issue 9223016: Add a getter for value set with AllowCodeGenerationFromStrings (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 10 months 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
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4295 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::IsCodeGenerationFromStringsAllowed() {
4317 i::Isolate* isolate = i::Isolate::Current();
4318 if (IsDeadCheck(isolate,
4319 "v8::Context::IsCodeGenerationFromStringsAllowed()")) {
4320 return false;
4321 }
4322 ENTER_V8(isolate);
4323 i::Object** ctx = reinterpret_cast<i::Object**>(this);
4324 i::Handle<i::Context> context =
4325 i::Handle<i::Context>::cast(i::Handle<i::Object>(ctx));
4326 return !context->allow_code_gen_from_strings()->IsFalse();
4327 }
4328
4329
4316 void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) { 4330 void V8::SetWrapperClassId(i::Object** global_handle, uint16_t class_id) {
4317 i::GlobalHandles::SetWrapperClassId(global_handle, class_id); 4331 i::GlobalHandles::SetWrapperClassId(global_handle, class_id);
4318 } 4332 }
4319 4333
4320 4334
4321 Local<v8::Object> ObjectTemplate::NewInstance() { 4335 Local<v8::Object> ObjectTemplate::NewInstance() {
4322 i::Isolate* isolate = i::Isolate::Current(); 4336 i::Isolate* isolate = i::Isolate::Current();
4323 ON_BAILOUT(isolate, "v8::ObjectTemplate::NewInstance()", 4337 ON_BAILOUT(isolate, "v8::ObjectTemplate::NewInstance()",
4324 return Local<v8::Object>()); 4338 return Local<v8::Object>());
4325 LOG_API(isolate, "ObjectTemplate::NewInstance"); 4339 LOG_API(isolate, "ObjectTemplate::NewInstance");
(...skipping 1848 matching lines...) Expand 10 before | Expand all | Expand 10 after
6174 6188
6175 6189
6176 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { 6190 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) {
6177 HandleScopeImplementer* scope_implementer = 6191 HandleScopeImplementer* scope_implementer =
6178 reinterpret_cast<HandleScopeImplementer*>(storage); 6192 reinterpret_cast<HandleScopeImplementer*>(storage);
6179 scope_implementer->IterateThis(v); 6193 scope_implementer->IterateThis(v);
6180 return storage + ArchiveSpacePerThread(); 6194 return storage + ArchiveSpacePerThread();
6181 } 6195 }
6182 6196
6183 } } // namespace v8::internal 6197 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « include/v8.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698