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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h

Issue 2690943002: Revert of binding: Changes the association among global-proxy/global/window-instance. (Closed)
Patch Set: Created 3 years, 10 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
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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 wrapper->SetAlignedPointerInInternalFields(WTF_ARRAY_LENGTH(indices), indices, 110 wrapper->SetAlignedPointerInInternalFields(WTF_ARRAY_LENGTH(indices), indices,
111 values); 111 values);
112 } 112 }
113 113
114 inline v8::Local<v8::Object> V8DOMWrapper::associateObjectWithWrapper( 114 inline v8::Local<v8::Object> V8DOMWrapper::associateObjectWithWrapper(
115 v8::Isolate* isolate, 115 v8::Isolate* isolate,
116 ScriptWrappable* impl, 116 ScriptWrappable* impl,
117 const WrapperTypeInfo* wrapperTypeInfo, 117 const WrapperTypeInfo* wrapperTypeInfo,
118 v8::Local<v8::Object> wrapper) { 118 v8::Local<v8::Object> wrapper) {
119 if (DOMDataStore::setWrapper(isolate, impl, wrapperTypeInfo, wrapper)) { 119 if (DOMDataStore::setWrapper(isolate, impl, wrapperTypeInfo, wrapper)) {
120 WrapperTypeInfo::wrapperCreated(); 120 wrapperTypeInfo->wrapperCreated();
121 setNativeInfo(isolate, wrapper, wrapperTypeInfo, impl); 121 setNativeInfo(isolate, wrapper, wrapperTypeInfo, impl);
122 ASSERT(hasInternalFieldsSet(wrapper)); 122 ASSERT(hasInternalFieldsSet(wrapper));
123 } 123 }
124 SECURITY_CHECK(toScriptWrappable(wrapper) == impl); 124 SECURITY_CHECK(toScriptWrappable(wrapper) == impl);
125 return wrapper; 125 return wrapper;
126 } 126 }
127 127
128 inline v8::Local<v8::Object> V8DOMWrapper::associateObjectWithWrapper( 128 inline v8::Local<v8::Object> V8DOMWrapper::associateObjectWithWrapper(
129 v8::Isolate* isolate, 129 v8::Isolate* isolate,
130 Node* node, 130 Node* node,
131 const WrapperTypeInfo* wrapperTypeInfo, 131 const WrapperTypeInfo* wrapperTypeInfo,
132 v8::Local<v8::Object> wrapper) { 132 v8::Local<v8::Object> wrapper) {
133 if (DOMDataStore::setWrapper(isolate, node, wrapperTypeInfo, wrapper)) { 133 if (DOMDataStore::setWrapper(isolate, node, wrapperTypeInfo, wrapper)) {
134 WrapperTypeInfo::wrapperCreated(); 134 wrapperTypeInfo->wrapperCreated();
135 setNativeInfo(isolate, wrapper, wrapperTypeInfo, 135 setNativeInfo(isolate, wrapper, wrapperTypeInfo,
136 ScriptWrappable::fromNode(node)); 136 ScriptWrappable::fromNode(node));
137 ASSERT(hasInternalFieldsSet(wrapper)); 137 ASSERT(hasInternalFieldsSet(wrapper));
138 } 138 }
139 SECURITY_CHECK(toScriptWrappable(wrapper) == ScriptWrappable::fromNode(node)); 139 SECURITY_CHECK(toScriptWrappable(wrapper) == ScriptWrappable::fromNode(node));
140 return wrapper; 140 return wrapper;
141 } 141 }
142 142
143 class V8WrapperInstantiationScope { 143 class V8WrapperInstantiationScope {
144 STACK_ALLOCATED(); 144 STACK_ALLOCATED();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 bool m_didEnterContext; 197 bool m_didEnterContext;
198 v8::Local<v8::Context> m_context; 198 v8::Local<v8::Context> m_context;
199 v8::TryCatch m_tryCatch; 199 v8::TryCatch m_tryCatch;
200 bool m_convertExceptions; 200 bool m_convertExceptions;
201 }; 201 };
202 202
203 } // namespace blink 203 } // namespace blink
204 204
205 #endif // V8DOMWrapper_h 205 #endif // V8DOMWrapper_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/V8Binding.h ('k') | third_party/WebKit/Source/bindings/core/v8/V8GCController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698