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

Side by Side Diff: src/d8.cc

Issue 1395583004: Revert of Don't compile functions in a context the caller doesn't have access to (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | src/generator.js » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 // Defined when linking against shared lib on Windows. 6 // Defined when linking against shared lib on Windows.
7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED) 7 #if defined(USING_V8_SHARED) && !defined(V8_SHARED)
8 #define V8_SHARED 8 #define V8_SHARED
9 #endif 9 #endif
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 if (worker == NULL) { 133 if (worker == NULL) {
134 Throw(isolate, "Worker is defunct because main thread is terminating"); 134 Throw(isolate, "Worker is defunct because main thread is terminating");
135 return NULL; 135 return NULL;
136 } 136 }
137 137
138 return worker; 138 return worker;
139 } 139 }
140 #endif // !V8_SHARED 140 #endif // !V8_SHARED
141 141
142 142
143 bool NamedAccessCheck(v8::Local<v8::Object> host, v8::Local<v8::Value> key,
144 v8::AccessType type, v8::Local<v8::Value> data) {
145 return false;
146 }
147
148
149 bool IndexedAccessCheck(v8::Local<v8::Object> host, uint32_t index,
150 v8::AccessType type, v8::Local<v8::Value> data) {
151 return false;
152 }
153
154 } // namespace 143 } // namespace
155 144
156 145
157 class PerIsolateData { 146 class PerIsolateData {
158 public: 147 public:
159 explicit PerIsolateData(Isolate* isolate) : isolate_(isolate), realms_(NULL) { 148 explicit PerIsolateData(Isolate* isolate) : isolate_(isolate), realms_(NULL) {
160 HandleScope scope(isolate); 149 HandleScope scope(isolate);
161 isolate->SetData(0, this); 150 isolate->SetData(0, this);
162 } 151 }
163 152
(...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after
1182 worker_fun_template); 1171 worker_fun_template);
1183 #endif // !V8_SHARED 1172 #endif // !V8_SHARED
1184 1173
1185 Local<ObjectTemplate> os_templ = ObjectTemplate::New(isolate); 1174 Local<ObjectTemplate> os_templ = ObjectTemplate::New(isolate);
1186 AddOSMethods(isolate, os_templ); 1175 AddOSMethods(isolate, os_templ);
1187 global_template->Set( 1176 global_template->Set(
1188 String::NewFromUtf8(isolate, "os", NewStringType::kNormal) 1177 String::NewFromUtf8(isolate, "os", NewStringType::kNormal)
1189 .ToLocalChecked(), 1178 .ToLocalChecked(),
1190 os_templ); 1179 os_templ);
1191 1180
1192 global_template->SetAccessCheckCallbacks(NamedAccessCheck,
1193 IndexedAccessCheck);
1194
1195 return global_template; 1181 return global_template;
1196 } 1182 }
1197 1183
1198 1184
1199 void Shell::Initialize(Isolate* isolate) { 1185 void Shell::Initialize(Isolate* isolate) {
1200 #ifndef V8_SHARED 1186 #ifndef V8_SHARED
1201 // Set up counters 1187 // Set up counters
1202 if (i::StrLength(i::FLAG_map_counters) != 0) 1188 if (i::StrLength(i::FLAG_map_counters) != 0)
1203 MapCounters(isolate, i::FLAG_map_counters); 1189 MapCounters(isolate, i::FLAG_map_counters);
1204 #endif // !V8_SHARED 1190 #endif // !V8_SHARED
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
2490 } 2476 }
2491 2477
2492 } // namespace v8 2478 } // namespace v8
2493 2479
2494 2480
2495 #ifndef GOOGLE3 2481 #ifndef GOOGLE3
2496 int main(int argc, char* argv[]) { 2482 int main(int argc, char* argv[]) {
2497 return v8::Shell::Main(argc, argv); 2483 return v8::Shell::Main(argc, argv);
2498 } 2484 }
2499 #endif 2485 #endif
OLDNEW
« no previous file with comments | « no previous file | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698