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

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

Issue 109473008: Remove custom signatures 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/custom/V8MessageEventCustom.cpp » ('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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 // FIXME: Should pass in appropriate creationContext 131 // FIXME: Should pass in appropriate creationContext
132 v8::Handle<v8::Object> filterWrapper = toV8(filter, v8::Handle<v8::Object>() , isolate).As<v8::Object>(); 132 v8::Handle<v8::Object> filterWrapper = toV8(filter, v8::Handle<v8::Object>() , isolate).As<v8::Object>();
133 133
134 RefPtr<NodeFilterCondition> condition = V8NodeFilterCondition::create(callba ck, filterWrapper, isolate); 134 RefPtr<NodeFilterCondition> condition = V8NodeFilterCondition::create(callba ck, filterWrapper, isolate);
135 filter->setCondition(condition.release()); 135 filter->setCondition(condition.release());
136 136
137 return filter.release(); 137 return filter.release();
138 } 138 }
139 139
140 DOMWindow* toNativeDOMWindow(v8::Handle<v8::Value> value, v8::Isolate* isolate)
141 {
142 if (value.IsEmpty() || !value->IsObject())
143 return 0;
144
145 v8::Handle<v8::Object> global = v8::Handle<v8::Object>::Cast(value);
146 v8::Handle<v8::Object> windowWrapper = global->FindInstanceInPrototypeChain( V8Window::domTemplate(isolate, worldType(isolate)));
147 if (windowWrapper.IsEmpty())
148 return 0;
149 return V8Window::toNative(windowWrapper);
150 }
151
140 const int32_t kMaxInt32 = 0x7fffffff; 152 const int32_t kMaxInt32 = 0x7fffffff;
141 const int32_t kMinInt32 = -kMaxInt32 - 1; 153 const int32_t kMinInt32 = -kMaxInt32 - 1;
142 const uint32_t kMaxUInt32 = 0xffffffff; 154 const uint32_t kMaxUInt32 = 0xffffffff;
143 const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, maximum integ er exactly representable in ECMAScript. 155 const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, maximum integ er exactly representable in ECMAScript.
144 156
145 static double enforceRange(double x, double minimum, double maximum, bool& ok) 157 static double enforceRange(double x, double minimum, double maximum, bool& ok)
146 { 158 {
147 if (std::isnan(x) || std::isinf(x)) { 159 if (std::isnan(x) || std::isinf(x)) {
148 ok = false; 160 ok = false;
149 return 0; 161 return 0;
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 return mainThreadIsolate(); 651 return mainThreadIsolate();
640 return v8::Isolate::GetCurrent(); 652 return v8::Isolate::GetCurrent();
641 } 653 }
642 654
643 v8::Isolate* toIsolate(Frame* frame) 655 v8::Isolate* toIsolate(Frame* frame)
644 { 656 {
645 return frame->script().isolate(); 657 return frame->script().isolate();
646 } 658 }
647 659
648 } // namespace WebCore 660 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/V8Binding.h ('k') | Source/bindings/v8/custom/V8MessageEventCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698