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

Side by Side Diff: Source/bindings/v8/V8PerContextData.h

Issue 217053007: Revert of Make DOMWrapperWorld::current() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert 213543004 too Created 6 years, 9 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/V8MutationCallback.cpp ('k') | Source/bindings/v8/V8PerContextData.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 }; 60 };
61 61
62 class V8PerContextData { 62 class V8PerContextData {
63 public: 63 public:
64 static PassOwnPtr<V8PerContextData> create(v8::Handle<v8::Context> context, PassRefPtr<DOMWrapperWorld> world) 64 static PassOwnPtr<V8PerContextData> create(v8::Handle<v8::Context> context, PassRefPtr<DOMWrapperWorld> world)
65 { 65 {
66 return adoptPtr(new V8PerContextData(context, world)); 66 return adoptPtr(new V8PerContextData(context, world));
67 } 67 }
68 68
69 static V8PerContextData* from(v8::Handle<v8::Context>); 69 static V8PerContextData* from(v8::Handle<v8::Context>);
70 static DOMWrapperWorld& world(v8::Handle<v8::Context>); 70 static DOMWrapperWorld* world(v8::Handle<v8::Context>);
71 71
72 ~V8PerContextData(); 72 ~V8PerContextData();
73 73
74 v8::Handle<v8::Context> context() { return m_context.newLocal(m_isolate); } 74 v8::Handle<v8::Context> context() { return m_context.newLocal(m_isolate); }
75 75
76 // To create JS Wrapper objects, we create a cache of a 'boiler plate' 76 // To create JS Wrapper objects, we create a cache of a 'boiler plate'
77 // object, and then simply Clone that object each time we need a new one. 77 // object, and then simply Clone that object each time we need a new one.
78 // This is faster than going through the full object creation process. 78 // This is faster than going through the full object creation process.
79 v8::Local<v8::Object> createWrapperFromCache(const WrapperTypeInfo* type) 79 v8::Local<v8::Object> createWrapperFromCache(const WrapperTypeInfo* type)
80 { 80 {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 class V8PerContextDebugData { 133 class V8PerContextDebugData {
134 public: 134 public:
135 static bool setContextDebugData(v8::Handle<v8::Context>, const char* worldNa me, int debugId); 135 static bool setContextDebugData(v8::Handle<v8::Context>, const char* worldNa me, int debugId);
136 static int contextDebugId(v8::Handle<v8::Context>); 136 static int contextDebugId(v8::Handle<v8::Context>);
137 }; 137 };
138 138
139 } // namespace WebCore 139 } // namespace WebCore
140 140
141 #endif // V8PerContextData_h 141 #endif // V8PerContextData_h
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8MutationCallback.cpp ('k') | Source/bindings/v8/V8PerContextData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698