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

Side by Side Diff: Source/bindings/v8/DOMWrapperWorld.cpp

Issue 33523002: Have Frame::script() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/v8/DOMWrapperWorld.h ('k') | Source/bindings/v8/NPV8Object.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 world = adoptRef(new DOMWrapperWorld(worldId, extensionGroup)); 158 world = adoptRef(new DOMWrapperWorld(worldId, extensionGroup));
159 result.iterator->value = world.get(); 159 result.iterator->value = world.get();
160 isolatedWorldCount++; 160 isolatedWorldCount++;
161 ASSERT(map.size() == isolatedWorldCount); 161 ASSERT(map.size() == isolatedWorldCount);
162 162
163 return world.release(); 163 return world.release();
164 } 164 }
165 165
166 v8::Handle<v8::Context> DOMWrapperWorld::context(ScriptController* controller) 166 v8::Handle<v8::Context> DOMWrapperWorld::context(ScriptController& controller)
167 { 167 {
168 return controller->windowShell(this)->context(); 168 return controller.windowShell(this)->context();
169 } 169 }
170 170
171 typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap; 171 typedef HashMap<int, RefPtr<SecurityOrigin> > IsolatedWorldSecurityOriginMap;
172 static IsolatedWorldSecurityOriginMap& isolatedWorldSecurityOrigins() 172 static IsolatedWorldSecurityOriginMap& isolatedWorldSecurityOrigins()
173 { 173 {
174 ASSERT(isMainThread()); 174 ASSERT(isMainThread());
175 DEFINE_STATIC_LOCAL(IsolatedWorldSecurityOriginMap, map, ()); 175 DEFINE_STATIC_LOCAL(IsolatedWorldSecurityOriginMap, map, ());
176 return map; 176 return map;
177 } 177 }
178 178
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 } 244 }
245 245
246 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId) 246 V8DOMActivityLogger* DOMWrapperWorld::activityLogger(int worldId)
247 { 247 {
248 DOMActivityLoggerMap& loggers = domActivityLoggers(); 248 DOMActivityLoggerMap& loggers = domActivityLoggers();
249 DOMActivityLoggerMap::iterator it = loggers.find(worldId); 249 DOMActivityLoggerMap::iterator it = loggers.find(worldId);
250 return it == loggers.end() ? 0 : it->value.get(); 250 return it == loggers.end() ? 0 : it->value.get();
251 } 251 }
252 252
253 } // namespace WebCore 253 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/DOMWrapperWorld.h ('k') | Source/bindings/v8/NPV8Object.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698