| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 return MainWorld; | 532 return MainWorld; |
| 533 } | 533 } |
| 534 | 534 |
| 535 DOMWrapperWorld* isolatedWorldForIsolate(v8::Isolate* isolate) | 535 DOMWrapperWorld* isolatedWorldForIsolate(v8::Isolate* isolate) |
| 536 { | 536 { |
| 537 V8PerIsolateData* data = V8PerIsolateData::from(isolate); | 537 V8PerIsolateData* data = V8PerIsolateData::from(isolate); |
| 538 if (data->workerDOMDataStore()) | 538 if (data->workerDOMDataStore()) |
| 539 return 0; | 539 return 0; |
| 540 if (!DOMWrapperWorld::isolatedWorldsExist()) | 540 if (!DOMWrapperWorld::isolatedWorldsExist()) |
| 541 return 0; | 541 return 0; |
| 542 ASSERT(!v8::Context::GetEntered().IsEmpty()); | 542 ASSERT(v8::Context::InContext()); |
| 543 return DOMWrapperWorld::isolatedWorld(v8::Context::GetEntered()); | 543 return DOMWrapperWorld::isolatedWorld(v8::Context::GetCurrent()); |
| 544 } |
| 545 |
| 546 v8::Local<v8::Value> getHiddenValueFromMainWorldWrapper(v8::Isolate* isolate, Sc
riptWrappable* wrappable, v8::Handle<v8::String> key) |
| 547 { |
| 548 v8::Local<v8::Object> wrapper = wrappable->newLocalWrapper(isolate); |
| 549 return wrapper.IsEmpty() ? v8::Local<v8::Value>() : wrapper->GetHiddenValue(
key); |
| 544 } | 550 } |
| 545 | 551 |
| 546 } // namespace WebCore | 552 } // namespace WebCore |
| OLD | NEW |