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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/V8DOMWrapper.h

Issue 1825323002: bindings: Removes a wrong ASSERT: Exception must be thrown across origins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/DOMWindow.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 setNativeInfo(wrapper, wrapperTypeInfo, ScriptWrappable::fromNode(node)) ; 104 setNativeInfo(wrapper, wrapperTypeInfo, ScriptWrappable::fromNode(node)) ;
105 ASSERT(hasInternalFieldsSet(wrapper)); 105 ASSERT(hasInternalFieldsSet(wrapper));
106 } 106 }
107 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(toScriptWrappable(wrapper) == Scrip tWrappable::fromNode(node)); 107 RELEASE_ASSERT_WITH_SECURITY_IMPLICATION(toScriptWrappable(wrapper) == Scrip tWrappable::fromNode(node));
108 return wrapper; 108 return wrapper;
109 } 109 }
110 110
111 class V8WrapperInstantiationScope { 111 class V8WrapperInstantiationScope {
112 STACK_ALLOCATED(); 112 STACK_ALLOCATED();
113 public: 113 public:
114 V8WrapperInstantiationScope(v8::Local<v8::Object> creationContext, v8::Isola te* isolate, bool withSecurityCheck = true) 114 V8WrapperInstantiationScope(v8::Local<v8::Object> creationContext, v8::Isola te* isolate, bool withSecurityCheck)
115 : m_didEnterContext(false) 115 : m_didEnterContext(false)
116 , m_context(isolate->GetCurrentContext()) 116 , m_context(isolate->GetCurrentContext())
117 , m_tryCatch(isolate) 117 , m_tryCatch(isolate)
118 , m_convertExceptions(false) 118 , m_convertExceptions(false)
119 { 119 {
120 // creationContext should not be empty. Because if we have an 120 // creationContext should not be empty. Because if we have an
121 // empty creationContext, we will end up creating 121 // empty creationContext, we will end up creating
122 // a new object in the context currently entered. This is wrong. 122 // a new object in the context currently entered. This is wrong.
123 RELEASE_ASSERT(!creationContext.IsEmpty()); 123 RELEASE_ASSERT(!creationContext.IsEmpty());
124 v8::Local<v8::Context> contextForWrapper = creationContext->CreationCont ext(); 124 v8::Local<v8::Context> contextForWrapper = creationContext->CreationCont ext();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 162
163 bool m_didEnterContext; 163 bool m_didEnterContext;
164 v8::Local<v8::Context> m_context; 164 v8::Local<v8::Context> m_context;
165 v8::TryCatch m_tryCatch; 165 v8::TryCatch m_tryCatch;
166 bool m_convertExceptions; 166 bool m_convertExceptions;
167 }; 167 };
168 168
169 } // namespace blink 169 } // namespace blink
170 170
171 #endif // V8DOMWrapper_h 171 #endif // V8DOMWrapper_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/DOMWindow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698