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

Side by Side Diff: include/v8.h

Issue 198253004: Introduce per-isolate assert scopes and API to guard JS execution. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: add missing file Created 6 years, 9 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 | « no previous file | src/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 4052 matching lines...) Expand 10 before | Expand all | Expand 10 after
4063 ~Scope() { isolate_->Exit(); } 4063 ~Scope() { isolate_->Exit(); }
4064 4064
4065 private: 4065 private:
4066 Isolate* const isolate_; 4066 Isolate* const isolate_;
4067 4067
4068 // Prevent copying of Scope objects. 4068 // Prevent copying of Scope objects.
4069 Scope(const Scope&); 4069 Scope(const Scope&);
4070 Scope& operator=(const Scope&); 4070 Scope& operator=(const Scope&);
4071 }; 4071 };
4072 4072
4073
4074 /**
4075 * Assert that no Javascript code is invoked.
4076 */
4077 class DisallowJavascriptExecutionScope {
4078 public:
4079 explicit DisallowJavascriptExecutionScope(Isolate* isolate);
4080 ~DisallowJavascriptExecutionScope();
4081
4082 private:
4083 void* internal_;
4084 };
jochen (gone - plz use gerrit) 2014/03/19 11:13:16 can you add copy and assign declarations? (like in
4085
4086
4087 /**
4088 * Introduce exception to DisallowJavascriptExecutionScope.
4089 */
4090 class AllowJavascriptExecutionScope {
4091 public:
4092 explicit AllowJavascriptExecutionScope(Isolate* isolate);
4093 ~AllowJavascriptExecutionScope();
4094
4095 private:
4096 void* internal_;
4097 };
4098
4073 /** 4099 /**
4074 * Types of garbage collections that can be requested via 4100 * Types of garbage collections that can be requested via
4075 * RequestGarbageCollectionForTesting. 4101 * RequestGarbageCollectionForTesting.
4076 */ 4102 */
4077 enum GarbageCollectionType { 4103 enum GarbageCollectionType {
4078 kFullGarbageCollection, 4104 kFullGarbageCollection,
4079 kMinorGarbageCollection 4105 kMinorGarbageCollection
4080 }; 4106 };
4081 4107
4082 /** 4108 /**
(...skipping 2500 matching lines...) Expand 10 before | Expand all | Expand 10 after
6583 */ 6609 */
6584 6610
6585 6611
6586 } // namespace v8 6612 } // namespace v8
6587 6613
6588 6614
6589 #undef TYPE_CHECK 6615 #undef TYPE_CHECK
6590 6616
6591 6617
6592 #endif // V8_H_ 6618 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698