| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 bool V8Window::namedSecurityCheckCustom(v8::Local<v8::Object> host, v8::Local<v8
::Value> key, v8::AccessType type, v8::Local<v8::Value>) | 338 bool V8Window::namedSecurityCheckCustom(v8::Local<v8::Object> host, v8::Local<v8
::Value> key, v8::AccessType type, v8::Local<v8::Value>) |
| 339 { | 339 { |
| 340 return securityCheck(host); | 340 return securityCheck(host); |
| 341 } | 341 } |
| 342 | 342 |
| 343 bool V8Window::indexedSecurityCheckCustom(v8::Local<v8::Object> host, uint32_t i
ndex, v8::AccessType type, v8::Local<v8::Value>) | 343 bool V8Window::indexedSecurityCheckCustom(v8::Local<v8::Object> host, uint32_t i
ndex, v8::AccessType type, v8::Local<v8::Value>) |
| 344 { | 344 { |
| 345 return securityCheck(host); | 345 return securityCheck(host); |
| 346 } | 346 } |
| 347 | 347 |
| 348 v8::Handle<v8::Value> toV8(DOMWindow* window, v8::Handle<v8::Object> creationCon
text, v8::Isolate* isolate) | |
| 349 { | |
| 350 // Notice that we explicitly ignore creationContext because the LocalDOMWind
ow is its own creationContext. | |
| 351 | |
| 352 if (!window) | |
| 353 return v8::Null(isolate); | |
| 354 // Initializes environment of a frame, and return the global object | |
| 355 // of the frame. | |
| 356 Frame * frame = window->frame(); | |
| 357 if (!frame) | |
| 358 return v8Undefined(); | |
| 359 | |
| 360 v8::Local<v8::Context> context = toV8Context(frame, DOMWrapperWorld::current
(isolate)); | |
| 361 if (context.IsEmpty()) | |
| 362 return v8Undefined(); | |
| 363 | |
| 364 v8::Local<v8::Object> global = context->Global(); | |
| 365 ASSERT(!global.IsEmpty()); | |
| 366 return global; | |
| 367 } | |
| 368 | |
| 369 } // namespace blink | 348 } // namespace blink |
| OLD | NEW |