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

Side by Side Diff: bindings/v8/V8DOMWrapper.cpp

Issue 160590: A patch for http://crbug.com/17400... (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: Created 11 years, 4 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
« no previous file with comments | « bindings/v8/V8AbstractEventListener.h ('k') | bindings/v8/V8LazyEventListener.h » ('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 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // We add an extra internal field to all Document wrappers for 252 // We add an extra internal field to all Document wrappers for
253 // storing a per document DOMImplementation wrapper. 253 // storing a per document DOMImplementation wrapper.
254 // 254 //
255 // Additionally, we add two extra internal fields for 255 // Additionally, we add two extra internal fields for
256 // HTMLDocuments to implement temporary shadowing of 256 // HTMLDocuments to implement temporary shadowing of
257 // document.all. One field holds an object that is used as a 257 // document.all. One field holds an object that is used as a
258 // marker. The other field holds the marker object if 258 // marker. The other field holds the marker object if
259 // document.all is not shadowed and some other value if 259 // document.all is not shadowed and some other value if
260 // document.all is shadowed. 260 // document.all is shadowed.
261 v8::Local<v8::ObjectTemplate> instanceTemplate = descriptor->InstanceTem plate(); 261 v8::Local<v8::ObjectTemplate> instanceTemplate = descriptor->InstanceTem plate();
262 ASSERT(instanceTemplate->InternalFieldCount() == V8Custom::kDefaultWrapp erInternalFieldCount); 262 ASSERT(instanceTemplate->InternalFieldCount() == V8Custom::kNodeMinimumI nternalFieldCount);
263 instanceTemplate->SetInternalFieldCount(V8Custom::kHTMLDocumentInternalF ieldCount); 263 instanceTemplate->SetInternalFieldCount(V8Custom::kHTMLDocumentInternalF ieldCount);
264 break; 264 break;
265 } 265 }
266 #if ENABLE(SVG) 266 #if ENABLE(SVG)
267 case V8ClassIndex::SVGDOCUMENT: // fall through 267 case V8ClassIndex::SVGDOCUMENT: // fall through
268 #endif 268 #endif
269 case V8ClassIndex::DOCUMENT: { 269 case V8ClassIndex::DOCUMENT: {
270 // We add an extra internal field to all Document wrappers for 270 // We add an extra internal field to all Document wrappers for
271 // storing a per document DOMImplementation wrapper. 271 // storing a per document DOMImplementation wrapper.
272 v8::Local<v8::ObjectTemplate> instanceTemplate = descriptor->InstanceTem plate(); 272 v8::Local<v8::ObjectTemplate> instanceTemplate = descriptor->InstanceTem plate();
273 ASSERT(instanceTemplate->InternalFieldCount() == V8Custom::kDefaultWrapp erInternalFieldCount); 273 ASSERT(instanceTemplate->InternalFieldCount() == V8Custom::kNodeMinimumI nternalFieldCount);
274 instanceTemplate->SetInternalFieldCount( V8Custom::kDocumentMinimumInter nalFieldCount); 274 instanceTemplate->SetInternalFieldCount( V8Custom::kDocumentMinimumInter nalFieldCount);
275 break; 275 break;
276 } 276 }
277 case V8ClassIndex::HTMLAPPLETELEMENT: // fall through 277 case V8ClassIndex::HTMLAPPLETELEMENT: // fall through
278 case V8ClassIndex::HTMLEMBEDELEMENT: // fall through 278 case V8ClassIndex::HTMLEMBEDELEMENT: // fall through
279 case V8ClassIndex::HTMLOBJECTELEMENT: 279 case V8ClassIndex::HTMLOBJECTELEMENT:
280 // HTMLAppletElement, HTMLEmbedElement and HTMLObjectElement are 280 // HTMLAppletElement, HTMLEmbedElement and HTMLObjectElement are
281 // inherited from HTMLPlugInElement, and they share the same property 281 // inherited from HTMLPlugInElement, and they share the same property
282 // handling code. 282 // handling code.
283 descriptor->InstanceTemplate()->SetNamedPropertyHandler(USE_NAMED_PROPER TY_GETTER(HTMLPlugInElement), USE_NAMED_PROPERTY_SETTER(HTMLPlugInElement)); 283 descriptor->InstanceTemplate()->SetNamedPropertyHandler(USE_NAMED_PROPER TY_GETTER(HTMLPlugInElement), USE_NAMED_PROPERTY_SETTER(HTMLPlugInElement));
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 v8::Handle<v8::Context> context = V8Proxy::context(frame); 1428 v8::Handle<v8::Context> context = V8Proxy::context(frame);
1429 if (context.IsEmpty()) 1429 if (context.IsEmpty())
1430 return v8::Handle<v8::Object>(); 1430 return v8::Handle<v8::Object>();
1431 1431
1432 v8::Handle<v8::Object> global = context->Global(); 1432 v8::Handle<v8::Object> global = context->Global();
1433 ASSERT(!global.IsEmpty()); 1433 ASSERT(!global.IsEmpty());
1434 return global; 1434 return global;
1435 } 1435 }
1436 1436
1437 } // namespace WebCore 1437 } // namespace WebCore
OLDNEW
« no previous file with comments | « bindings/v8/V8AbstractEventListener.h ('k') | bindings/v8/V8LazyEventListener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698