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

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

Issue 23637014: Have V8HiddenPropertyName static functions take an isolate in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 if (documentWrapper.IsEmpty()) { 355 if (documentWrapper.IsEmpty()) {
356 clearDocumentProperty(); 356 clearDocumentProperty();
357 return; 357 return;
358 } 358 }
359 ASSERT(documentWrapper->IsObject()); 359 ASSERT(documentWrapper->IsObject());
360 context->Global()->ForceSet(v8::String::NewSymbol("document"), documentWrapp er, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete)); 360 context->Global()->ForceSet(v8::String::NewSymbol("document"), documentWrapp er, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete));
361 361
362 // We also stash a reference to the document on the inner global object so t hat 362 // We also stash a reference to the document on the inner global object so t hat
363 // DOMWindow objects we obtain from JavaScript references are guaranteed to have 363 // DOMWindow objects we obtain from JavaScript references are guaranteed to have
364 // live Document objects. 364 // live Document objects.
365 toInnerGlobalObject(context)->SetHiddenValue(V8HiddenPropertyName::document( ), documentWrapper); 365 toInnerGlobalObject(context)->SetHiddenValue(V8HiddenPropertyName::document( m_isolate), documentWrapper);
366 } 366 }
367 367
368 void V8WindowShell::clearDocumentProperty() 368 void V8WindowShell::clearDocumentProperty()
369 { 369 {
370 ASSERT(!m_context.isEmpty()); 370 ASSERT(!m_context.isEmpty());
371 if (!m_world->isMainWorld()) 371 if (!m_world->isMainWorld())
372 return; 372 return;
373 v8::HandleScope handleScope(m_isolate); 373 v8::HandleScope handleScope(m_isolate);
374 m_context.newLocal(m_isolate)->Global()->ForceDelete(v8::String::NewSymbol(" document")); 374 m_context.newLocal(m_isolate)->Global()->ForceDelete(v8::String::NewSymbol(" document"));
375 } 375 }
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 void V8WindowShell::updateSecurityOrigin() 498 void V8WindowShell::updateSecurityOrigin()
499 { 499 {
500 ASSERT(m_world->isMainWorld()); 500 ASSERT(m_world->isMainWorld());
501 if (m_context.isEmpty()) 501 if (m_context.isEmpty())
502 return; 502 return;
503 v8::HandleScope handleScope(m_isolate); 503 v8::HandleScope handleScope(m_isolate);
504 setSecurityToken(); 504 setSecurityToken();
505 } 505 }
506 506
507 } // WebCore 507 } // WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8NodeFilterCondition.cpp ('k') | Source/bindings/v8/custom/V8CustomEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698