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

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 2200303003: Remove v8CallOrCrash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 years, 4 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) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 6394 matching lines...) Expand 10 before | Expand all | Expand 10 after
6405 persistentCache->newLocal(isolate)); 6405 persistentCache->newLocal(isolate));
6406 // It is important to mark the persistent cache as weak 6406 // It is important to mark the persistent cache as weak
6407 // (phantom, actually). Otherwise there will be a reference 6407 // (phantom, actually). Otherwise there will be a reference
6408 // cycle between it and its JavaScript wrapper, and currently 6408 // cycle between it and its JavaScript wrapper, and currently
6409 // there are problems collecting such cycles. 6409 // there are problems collecting such cycles.
6410 persistentCache->setPhantom(); 6410 persistentCache->setPhantom();
6411 } 6411 }
6412 6412
6413 v8::Local<v8::Array> localCache = persistentCache->newLocal(isolate); 6413 v8::Local<v8::Array> localCache = persistentCache->newLocal(isolate);
6414 if (targetObject) { 6414 if (targetObject) {
6415 v8CallOrCrash(localCache->Set(scriptState->context(), index, targetObjec t->mainWorldWrapper(isolate))); 6415 localCache->Set(scriptState->context(), index, targetObject->mainWorldWr apper(isolate)).ToChecked();
6416 } else { 6416 } else {
6417 v8CallOrCrash(localCache->Set(scriptState->context(), index, v8::Null(is olate))); 6417 localCache->Set(scriptState->context(), index, v8::Null(isolate)).ToChec ked();
6418 } 6418 }
6419 } 6419 }
6420 6420
6421 void WebGLRenderingContextBase::maybePreserveDefaultVAOObjectWrapper(ScriptState * scriptState) 6421 void WebGLRenderingContextBase::maybePreserveDefaultVAOObjectWrapper(ScriptState * scriptState)
6422 { 6422 {
6423 ASSERT(scriptState); 6423 ASSERT(scriptState);
6424 6424
6425 if (!m_preservedDefaultVAOObjectWrapper) { 6425 if (!m_preservedDefaultVAOObjectWrapper) {
6426 // The default VAO does not have a JavaScript wrapper created for it, bu t one is needed to 6426 // The default VAO does not have a JavaScript wrapper created for it, bu t one is needed to
6427 // link up the WebGLBuffers associated with the vertex attributes. 6427 // link up the WebGLBuffers associated with the vertex attributes.
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
6490 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1); 6490 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
6491 } 6491 }
6492 6492
6493 void WebGLRenderingContextBase::restoreUnpackParameters() 6493 void WebGLRenderingContextBase::restoreUnpackParameters()
6494 { 6494 {
6495 if (m_unpackAlignment != 1) 6495 if (m_unpackAlignment != 1)
6496 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6496 contextGL()->PixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6497 } 6497 }
6498 6498
6499 } // namespace blink 6499 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698