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

Side by Side Diff: Source/bindings/tests/results/V8TestInterface.cpp

Issue 196343032: Implement ImageData constructors. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Generate code that custom wrap()s constructor instances Created 6 years, 9 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rface", info.Holder(), info.GetIsolate()); 625 ExceptionState exceptionState(ExceptionState::ConstructionContext, "TestInte rface", info.Holder(), info.GetIsolate());
626 if (UNLIKELY(info.Length() < 1)) { 626 if (UNLIKELY(info.Length() < 1)) {
627 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length())); 627 exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, i nfo.Length()));
628 exceptionState.throwIfNeeded(); 628 exceptionState.throwIfNeeded();
629 return; 629 return;
630 } 630 }
631 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]); 631 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str1, info[0]);
632 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]); 632 V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, str2, info[1]);
633 ExecutionContext* context = currentExecutionContext(info.GetIsolate()); 633 ExecutionContext* context = currentExecutionContext(info.GetIsolate());
634 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, exce ptionState); 634 RefPtr<TestInterface> impl = TestInterface::create(context, str1, str2, exce ptionState);
635 v8::Handle<v8::Object> wrapper = info.Holder();
636 if (exceptionState.throwIfNeeded()) 635 if (exceptionState.throwIfNeeded())
637 return; 636 return;
638 637
638 v8::Handle<v8::Object> wrapper = info.Holder();
639 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V 8TestInterface::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguratio n::Dependent); 639 V8DOMWrapper::associateObjectWithWrapper<V8TestInterface>(impl.release(), &V 8TestInterface::wrapperTypeInfo, wrapper, info.GetIsolate(), WrapperConfiguratio n::Dependent);
640 v8SetReturnValue(info, wrapper); 640 v8SetReturnValue(info, wrapper);
641 } 641 }
642 642
643 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info) 643 static void namedPropertyGetter(v8::Local<v8::String> name, const v8::PropertyCa llbackInfo<v8::Value>& info)
644 { 644 {
645 if (info.Holder()->HasRealNamedProperty(name)) 645 if (info.Holder()->HasRealNamedProperty(name))
646 return; 646 return;
647 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) 647 if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty())
648 return; 648 return;
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 } 912 }
913 913
914 template<> 914 template<>
915 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate) 915 v8::Handle<v8::Value> toV8NoInline(TestInterface* impl, v8::Handle<v8::Object> c reationContext, v8::Isolate* isolate)
916 { 916 {
917 return toV8(impl, creationContext, isolate); 917 return toV8(impl, creationContext, isolate);
918 } 918 }
919 919
920 } // namespace WebCore 920 } // namespace WebCore
921 #endif // ENABLE(Condition1) || ENABLE(Condition2) 921 #endif // ENABLE(Condition1) || ENABLE(Condition2)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698