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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp

Issue 1878943003: Remove RawPtr from bindings/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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) 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 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 updateActivityLogger(); 500 updateActivityLogger();
501 updateDocumentProperty(); 501 updateDocumentProperty();
502 updateSecurityOrigin(m_frame->securityContext()->getSecurityOrigin()); 502 updateSecurityOrigin(m_frame->securityContext()->getSecurityOrigin());
503 } 503 }
504 504
505 static v8::Local<v8::Value> getNamedProperty(HTMLDocument* htmlDocument, const A tomicString& key, v8::Local<v8::Object> creationContext, v8::Isolate* isolate) 505 static v8::Local<v8::Value> getNamedProperty(HTMLDocument* htmlDocument, const A tomicString& key, v8::Local<v8::Object> creationContext, v8::Isolate* isolate)
506 { 506 {
507 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key )) 507 if (!htmlDocument->hasNamedItem(key) && !htmlDocument->hasExtraNamedItem(key ))
508 return v8Undefined(); 508 return v8Undefined();
509 509
510 RawPtr<DocumentNameCollection> items = htmlDocument->documentNamedItems(key) ; 510 DocumentNameCollection* items = htmlDocument->documentNamedItems(key);
511 if (items->isEmpty()) 511 if (items->isEmpty())
512 return v8Undefined(); 512 return v8Undefined();
513 513
514 if (items->hasExactlyOneItem()) { 514 if (items->hasExactlyOneItem()) {
515 HTMLElement* element = items->item(0); 515 HTMLElement* element = items->item(0);
516 ASSERT(element); 516 ASSERT(element);
517 Frame* frame = isHTMLIFrameElement(*element) ? toHTMLIFrameElement(*elem ent).contentFrame() : 0; 517 Frame* frame = isHTMLIFrameElement(*element) ? toHTMLIFrameElement(*elem ent).contentFrame() : 0;
518 if (frame) 518 if (frame)
519 return toV8(frame->domWindow(), creationContext, isolate); 519 return toV8(frame->domWindow(), creationContext, isolate);
520 return toV8(element, creationContext, isolate); 520 return toV8(element, creationContext, isolate);
521 } 521 }
522 return toV8(RawPtr<HTMLCollection>(items.release()), creationContext, isolat e); 522 return toV8(RawPtr<HTMLCollection>(items), creationContext, isolate);
sof 2016/04/12 07:29:54 Redundant cast?
523 } 523 }
524 524
525 static void getter(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo< v8::Value>& info) 525 static void getter(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo< v8::Value>& info)
526 { 526 {
527 // FIXME: Consider passing StringImpl directly. 527 // FIXME: Consider passing StringImpl directly.
528 AtomicString name = toCoreAtomicString(property.As<v8::String>()); 528 AtomicString name = toCoreAtomicString(property.As<v8::String>());
529 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder()); 529 HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder());
530 ASSERT(htmlDocument); 530 ASSERT(htmlDocument);
531 v8::Local<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hold er(), info.GetIsolate()); 531 v8::Local<v8::Value> result = getNamedProperty(htmlDocument, name, info.Hold er(), info.GetIsolate());
532 if (!result.IsEmpty()) { 532 if (!result.IsEmpty()) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 } 574 }
575 575
576 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin) 576 void WindowProxy::updateSecurityOrigin(SecurityOrigin* origin)
577 { 577 {
578 if (!isContextInitialized()) 578 if (!isContextInitialized())
579 return; 579 return;
580 setSecurityToken(origin); 580 setSecurityToken(origin);
581 } 581 }
582 582
583 } // namespace blink 583 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698