OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 return mainThreadNormalWorld(); | 80 return mainThreadNormalWorld(); |
81 } | 81 } |
82 | 82 |
83 DOMWrapperWorld* mainThreadNormalWorld() | 83 DOMWrapperWorld* mainThreadNormalWorld() |
84 { | 84 { |
85 ASSERT(isMainThread()); | 85 ASSERT(isMainThread()); |
86 DEFINE_STATIC_REF(DOMWrapperWorld, cachedNormalWorld, (DOMWrapperWorld::crea
teMainWorld())); | 86 DEFINE_STATIC_REF(DOMWrapperWorld, cachedNormalWorld, (DOMWrapperWorld::crea
teMainWorld())); |
87 return cachedNormalWorld; | 87 return cachedNormalWorld; |
88 } | 88 } |
89 | 89 |
90 // FIXME: Remove this function. There is currently an issue with the inspector r
elated to the call to dispatchDidClearWindowObjectInWorld in ScriptController::w
indowShell. | |
91 DOMWrapperWorld* existingWindowShellWorkaroundWorld() | |
92 { | |
93 DEFINE_STATIC_REF(DOMWrapperWorld, world, (adoptRef(new DOMWrapperWorld(Main
WorldId - 1, DOMWrapperWorld::mainWorldExtensionGroup - 1)))); | |
94 return world; | |
95 } | |
96 | |
97 bool DOMWrapperWorld::contextHasCorrectPrototype(v8::Handle<v8::Context> context
) | 90 bool DOMWrapperWorld::contextHasCorrectPrototype(v8::Handle<v8::Context> context
) |
98 { | 91 { |
99 ASSERT(isMainThread()); | 92 ASSERT(isMainThread()); |
100 if (initializingWindow) | 93 if (initializingWindow) |
101 return true; | 94 return true; |
102 return V8DOMWrapper::isWrapperOfType(toInnerGlobalObject(context), &V8Window
::wrapperTypeInfo); | 95 return V8DOMWrapper::isWrapperOfType(toInnerGlobalObject(context), &V8Window
::wrapperTypeInfo); |
103 } | 96 } |
104 | 97 |
105 void DOMWrapperWorld::setIsolatedWorldField(v8::Handle<v8::Context> context) | 98 void DOMWrapperWorld::setIsolatedWorldField(v8::Handle<v8::Context> context) |
106 { | 99 { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } | 238 } |
246 | 239 |
247 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) | 240 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) |
248 { | 241 { |
249 DOMActivityLoggerMap& loggers = domActivityLoggers(); | 242 DOMActivityLoggerMap& loggers = domActivityLoggers(); |
250 DOMActivityLoggerMap::iterator it = loggers.find(worldId); | 243 DOMActivityLoggerMap::iterator it = loggers.find(worldId); |
251 return it == loggers.end() ? 0 : it->value.get(); | 244 return it == loggers.end() ? 0 : it->value.get(); |
252 } | 245 } |
253 | 246 |
254 } // namespace WebCore | 247 } // namespace WebCore |
OLD | NEW |