kopia lustrzana https://github.com/backface/turtlestitch
Throw an error for “obsolete” blocks
instead of (forever) doing nothing (and thus often freezing and crashing). Thanks, Paul, for helping identify this!dev
rodzic
291555d9e1
commit
825c5f5568
|
@ -2858,3 +2858,7 @@ end - bulk of 151215
|
|||
------
|
||||
* Paint: avoid pixel collision detection in PaintCanvas (optimization)
|
||||
* BYOB: fixed a zebra coloring glitch in the block editor
|
||||
|
||||
160119
|
||||
------
|
||||
* Threads, Store: Throw an error for “obsolete” blocks instead of (forever) doing nothing (and thus often freezing and crashing). Thanks, Paul, for helping identify this!
|
||||
|
|
6
store.js
6
store.js
|
@ -7,7 +7,7 @@
|
|||
written by Jens Mönig
|
||||
jens@moenig.org
|
||||
|
||||
Copyright (C) 2015 by Jens Mönig
|
||||
Copyright (C) 2016 by Jens Mönig
|
||||
|
||||
This file is part of Snap!.
|
||||
|
||||
|
@ -61,7 +61,7 @@ SyntaxElementMorph, Variable*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.store = '2015-December-15';
|
||||
modules.store = '2016-January-19';
|
||||
|
||||
|
||||
// XML_Serializer ///////////////////////////////////////////////////////
|
||||
|
@ -1073,7 +1073,7 @@ SnapSerializer.prototype.obsoleteBlock = function (isReporter) {
|
|||
// private
|
||||
var block = isReporter ? new ReporterBlockMorph()
|
||||
: new CommandBlockMorph();
|
||||
block.selector = 'nop';
|
||||
block.selector = 'errorObsolete';
|
||||
block.color = new Color(200, 0, 20);
|
||||
block.setSpec('Obsolete!');
|
||||
block.isDraggable = true;
|
||||
|
|
|
@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.threads = '2016-January-08';
|
||||
modules.threads = '2016-January-19';
|
||||
|
||||
var ThreadManager;
|
||||
var Process;
|
||||
|
@ -869,6 +869,10 @@ Process.prototype.handleError = function (error, element) {
|
|||
);
|
||||
};
|
||||
|
||||
Process.prototype.errorObsolete = function () {
|
||||
throw new Error('a custom block definition is missing');
|
||||
};
|
||||
|
||||
// Process Lambda primitives
|
||||
|
||||
Process.prototype.reify = function (topBlock, parameterNames, isCustomBlock) {
|
||||
|
|
Ładowanie…
Reference in New Issue