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

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

Issue 104873018: Remove raw DOM templates from V8 bindings (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/V8Binding.h ('k') | Source/bindings/v8/V8PerIsolateData.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) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // Does the value convert to nan or to an infinity? 436 // Does the value convert to nan or to an infinity?
437 if (std::isnan(x) || std::isinf(x)) 437 if (std::isnan(x) || std::isinf(x))
438 return 0; 438 return 0;
439 439
440 // NaNs and +/-Infinity should be 0, otherwise modulo 2^64. 440 // NaNs and +/-Infinity should be 0, otherwise modulo 2^64.
441 unsigned long long integer; 441 unsigned long long integer;
442 doubleToInteger(x, integer); 442 doubleToInteger(x, integer);
443 return integer; 443 return integer;
444 } 444 }
445 445
446 v8::Handle<v8::FunctionTemplate> createRawTemplate(v8::Isolate* isolate)
447 {
448 v8::EscapableHandleScope scope(isolate);
449 v8::Local<v8::FunctionTemplate> result = v8::FunctionTemplate::New(isolate, V8ObjectConstructor::isValidConstructorMode);
450 return scope.Escape(result);
451 }
452
453 PassRefPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value> value, v8::I solate* isolate) 446 PassRefPtr<XPathNSResolver> toXPathNSResolver(v8::Handle<v8::Value> value, v8::I solate* isolate)
454 { 447 {
455 RefPtr<XPathNSResolver> resolver; 448 RefPtr<XPathNSResolver> resolver;
456 if (V8XPathNSResolver::hasInstance(value, isolate, worldType(isolate))) 449 if (V8XPathNSResolver::hasInstance(value, isolate, worldType(isolate)))
457 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu e)); 450 resolver = V8XPathNSResolver::toNative(v8::Handle<v8::Object>::Cast(valu e));
458 else if (value->IsObject()) 451 else if (value->IsObject())
459 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate); 452 resolver = V8CustomXPathNSResolver::create(value->ToObject(), isolate);
460 return resolver; 453 return resolver;
461 } 454 }
462 455
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 return mainThreadIsolate(); 644 return mainThreadIsolate();
652 return v8::Isolate::GetCurrent(); 645 return v8::Isolate::GetCurrent();
653 } 646 }
654 647
655 v8::Isolate* toIsolate(Frame* frame) 648 v8::Isolate* toIsolate(Frame* frame)
656 { 649 {
657 return frame->script().isolate(); 650 return frame->script().isolate();
658 } 651 }
659 652
660 } // namespace WebCore 653 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/V8PerIsolateData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698