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

Side by Side Diff: Source/bindings/v8/custom/V8WindowCustom.cpp

Issue 23578025: Remove useless calls to v8::Value::ToString() (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
« no previous file with comments | « Source/bindings/v8/V8NPUtils.cpp ('k') | no next file » | 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, 2011 Google Inc. All rights reserved. 2 * Copyright (C) 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 473
474 String name = toWebCoreString(key); 474 String name = toWebCoreString(key);
475 Frame* childFrame = target->tree()->scopedChild(name); 475 Frame* childFrame = target->tree()->scopedChild(name);
476 // Notice that we can't call HasRealNamedProperty for ACCESS_HAS 476 // Notice that we can't call HasRealNamedProperty for ACCESS_HAS
477 // because that would generate infinite recursion. 477 // because that would generate infinite recursion.
478 if (type == v8::ACCESS_HAS && childFrame) 478 if (type == v8::ACCESS_HAS && childFrame)
479 return true; 479 return true;
480 // We need to explicitly compare against nameOfProtoProperty because 480 // We need to explicitly compare against nameOfProtoProperty because
481 // V8's JSObject::LocalLookup finds __proto__ before 481 // V8's JSObject::LocalLookup finds __proto__ before
482 // interceptors and even when __proto__ isn't a "real named property". 482 // interceptors and even when __proto__ isn't a "real named property".
483 v8::Handle<v8::String> keyString = key->ToString(); 483 v8::Handle<v8::String> keyString = key.As<v8::String>();
484 if (type == v8::ACCESS_GET 484 if (type == v8::ACCESS_GET
485 && childFrame 485 && childFrame
486 && !host->HasRealNamedProperty(keyString) 486 && !host->HasRealNamedProperty(keyString)
487 && !window->HasRealNamedProperty(keyString) 487 && !window->HasRealNamedProperty(keyString)
488 && name != nameOfProtoProperty) 488 && name != nameOfProtoProperty)
489 return true; 489 return true;
490 } 490 }
491 491
492 return BindingSecurity::shouldAllowAccessToFrame(target, DoNotReportSecurity Error); 492 return BindingSecurity::shouldAllowAccessToFrame(target, DoNotReportSecurity Error);
493 } 493 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 v8::Handle<v8::Context> context = frame->script()->currentWorldContext(); 555 v8::Handle<v8::Context> context = frame->script()->currentWorldContext();
556 if (context.IsEmpty()) 556 if (context.IsEmpty())
557 return v8Undefined(); 557 return v8Undefined();
558 558
559 v8::Handle<v8::Object> global = context->Global(); 559 v8::Handle<v8::Object> global = context->Global();
560 ASSERT(!global.IsEmpty()); 560 ASSERT(!global.IsEmpty());
561 return global; 561 return global;
562 } 562 }
563 563
564 } // namespace WebCore 564 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8NPUtils.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698