Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
115a0476
Commit
115a0476
authored
Apr 18, 2017
by
Ian Hickson
Committed by
GitHub
Apr 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be more detailed in assert messages from _paintWithContext (#9409)
parent
9a05e984
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
3 deletions
+41
-3
object.dart
packages/flutter/lib/src/rendering/object.dart
+41
-3
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
115a0476
...
...
@@ -2167,9 +2167,47 @@ abstract class RenderObject extends AbstractNode implements HitTestTarget {
}
void
_paintWithContext
(
PaintingContext
context
,
Offset
offset
)
{
assert
(!
_debugDoingThisPaint
);
assert
(!
_needsLayout
);
assert
(!
_needsCompositingBitsUpdate
);
assert
(()
{
if
(
_debugDoingThisPaint
)
{
throw
new
FlutterError
(
'Tried to paint a RenderObject reentrantly.
\n
'
'The following RenderObject was already being painted when it was '
'painted again:
\n
'
'
${toStringShallow("\n ")}
\n
'
'Since this typically indicates an infinite recursion, it is '
'disallowed.'
);
}
if
(
_needsLayout
)
{
throw
new
FlutterError
(
'Tried to paint a RenderObject before it was laid out.
\n
'
'The following RenderObject was marked as dirty for layout at the '
'time that it was painted:
\n
'
'
${toStringShallow("\n ")}
\n
'
'A RenderObject that is still dirty for layout cannot be painted '
'because it does not know its own geometry yet.
\n
'
'Maybe one of the ancestors of this RenderObject was skipped '
'during the layout phase, but not skipped during the paint phase. '
'If the ancestor in question is below the nearest relayout boundary, '
'but is not below the nearest repaint boundary, that could cause '
'this error.'
);
}
if
(
_needsCompositingBitsUpdate
)
{
throw
new
FlutterError
(
'Tried to paint a RenderObject before its compositing bits were '
'updated.
\n
'
'The following RenderObject was marked as having dirty compositing '
'bits at the time that it was painted:
\n
'
'
${toStringShallow("\n ")}
\n
'
'A RenderObject that still has dirty compositing bits cannot be '
'painted because this indicates that the tree has not yet been '
'properly configured for creating the layer tree.
\n
'
'This usually indicates an error in the Flutter framework itself.'
);
}
return
true
;
});
RenderObject
debugLastActivePaint
;
assert
(()
{
_debugDoingThisPaint
=
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment